Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-12751 dfuse: Improve evict command. #12633

Merged
merged 5 commits into from
Jul 23, 2023
Merged

Conversation

ashleypittman
Copy link
Contributor

Improve error cases where path is not backed by dfuse.
Lock forget commands against inode query.
Print and accept inodes as integers only.

Evict the build tree as part of the DaosBuild test.

Required-githooks: true

Signed-off-by: Ashley Pittman [email protected]

Improve error cases where path is not backed by dfuse.
Lock forget commands against inode query.
Print and accept inodes as integers only.

Evict the build tree as part of the DaosBuild test.

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
@github-actions
Copy link

Bug-tracker data:
Ticket title is 'dfuse needs a mechanism to evict cached pool and container handles'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-12751

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

Required-githooks: true
Signed-off-by: Ashley Pittman <[email protected]>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

Test-tag: dfuse

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
@ashleypittman ashleypittman force-pushed the amd/dfuse-evict-cleanup branch from ceab235 to ebb2668 Compare July 17, 2023 11:34
@daosbuild1
Copy link
Collaborator

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

Comment on lines +2452 to +2453
if (rc == ENOTTY) {
rc = -DER_MISC;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't' change the value of rc but it does remove the extra output. I've filed https://daosio.atlassian.net/browse/DAOS-13977 to remove -DER_MISC across this command.

@ashleypittman ashleypittman marked this pull request as ready for review July 17, 2023 11:37
@ashleypittman ashleypittman requested review from a team as code owners July 17, 2023 11:37
@ashleypittman ashleypittman requested review from mjmac and removed request for a team July 17, 2023 11:37
DFUSE_TRA_DEBUG(fs_handle, "Forgetting %zi", count);
DFUSE_TRA_DEBUG(dfuse_info, "Forgetting %zi", count);

D_RWLOCK_RDLOCK(&dfuse_info->di_forget_lock);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D_RWLOCK_RDLOCK, not D_RWLOCK_WRLOCK?
Is this because d_hash_rec_ndecref has its own lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want forgets to happen in parallel as they do now so forget takes a reader lock (although it does modify - this is protected by the hash table) but I also want the ioctl to block whilst there are pending forget operations so that takes a writer lock. It's the only way I could think of for the ioctl to pause which pending operations are happening. The kernel seems to send a small number of forgetmany operation, each with a large number of forgets so this won't guarantee that the kernel has completed but it does at least pause the reader for any in-flight to complete.

Comment on lines +206 to +208
'daos filesystem query {}'.format(mount_dir),
'daos filesystem evict {}'.format(build_dir),
'daos filesystem query {}'.format(mount_dir),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a fix or a workaround?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither, this is to see how long the forget takes and see how effective it is. Plus check that it doesn't deadlock of course.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First results are in, all 3 commands took less than 0.00 seconds so the evict is fast, the first two commands reported 45065 inode in memory, the last one 4951. I don't think this test should be putting anything other than the build_dir so it would be interesting to see if nodes does drop to 1, if we could run the command in json mode remotely and get the evicted inode number then we could wait for it but I think that's outside the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests had exactly the same values which shouldn't be a surprise, the files that aren't being evicted are the venv files which makes sense.

@ashleypittman ashleypittman requested a review from a team July 20, 2023 15:58
@mchaarawi
Copy link
Contributor

the results are missing for the hw medium stage. it seems to have been skipped in the CI run?

@ashleypittman
Copy link
Contributor Author

the results are missing for the hw medium stage. it seems to have been skipped in the CI run?

It ran with Test-tag: dfuse

@mchaarawi
Copy link
Contributor

the results are missing for the hw medium stage. it seems to have been skipped in the CI run?

It ran with Test-tag: dfuse

shouldn't this be:
Feature: dfuse
since this is not a test only change?

@ashleypittman
Copy link
Contributor Author

the results are missing for the hw medium stage. it seems to have been skipped in the CI run?

It ran with Test-tag: dfuse

shouldn't this be: Feature: dfuse since this is not a test only change?

Features rather than Feature but yes, I think that would have done more testing and be enough to have at least one test in every stage. I'll update my processes.

@mchaarawi mchaarawi removed the request for review from a team July 21, 2023 16:41
@mchaarawi
Copy link
Contributor

the results are missing for the hw medium stage. it seems to have been skipped in the CI run?

It ran with Test-tag: dfuse

shouldn't this be: Feature: dfuse since this is not a test only change?

Features rather than Feature but yes, I think that would have done more testing and be enough to have at least one test in every stage. I'll update my processes.

thanks. please re-add gatekeeper when the testing completes

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@ashleypittman ashleypittman merged commit a20b521 into master Jul 23, 2023
@ashleypittman ashleypittman deleted the amd/dfuse-evict-cleanup branch July 23, 2023 19:27
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Signed-off-by: Ashley Pittman <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 pushed a commit that referenced this pull request Apr 26, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)
DAOS-14411 control: Expose dfuse statistics as yaml. (#13876)

Features: dfuse

Required-githooks: true

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033
Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
jolivier23 added a commit that referenced this pull request Apr 29, 2024
Multiple cherry-picks to add daos fs query feature for fuse
statistics.  Helpful for understanding and tuning DAOS
performance when dfuse is used.

DAOS-13625 dfuse: Merge the info and projection_info structs. (#11881)
DAOS-13658 dfuse: Add filesystem query command. (#12367)
DAOS-12751 control: Add a daos filesystem evict command. (#12331)
DAOS-12751 dfuse: Improve evict command. (#12633)
DAOS-13625 dfuse: Remove dfuse_projection_info entirely. (#12796)
DAOS-13625 dfuse: Replace fs_handle with dfuse_info. (#12894)
DAOS-13625 dfuse: Add core inode_lookup() and inode_decref() functions. (#12573)
DAOS-14411 dfuse: Add per-container statistics. (#12819)
DAOS-14411 control: Expose dfuse statistics as yaml. (#13876)

Changed base branch to google/2.4 for daos_build test

Change-Id: I8ae3cc743697c2434ae0d54b382ee6c585a3b033

Signed-off-by: Ashley Pittman <[email protected]>
Signed-off-by: Jeff Olivier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants