Skip to content

MDS: Small optimizations#60214

Merged
batrick merged 5 commits intoceph:mainfrom
MaxKellermann:mds_optimizations
Oct 22, 2024
Merged

MDS: Small optimizations#60214
batrick merged 5 commits intoceph:mainfrom
MaxKellermann:mds_optimizations

Conversation

@MaxKellermann
Copy link
Member

@MaxKellermann MaxKellermann commented Oct 9, 2024

MDS-specific parts of #60175 (split upon @batrick's request)

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

@github-actions github-actions bot added the cephfs Ceph File System label Oct 9, 2024
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

I assume these relatively simple changes are not the source of the 2x speedup you mentioned for the MDS?

@MaxKellermann
Copy link
Member Author

I assume these relatively simple changes are not the source of the 2x speedup you mentioned for the MDS?

No, not yet; these are just micro optimizations that will be hard to measure; hundreds of micro optimizations may be measurable eventually. But I have a bunch of patches that will make a larger impact, but not yet submitted.

An iterator is just a pointer, and passing it by reference means we
pass a pointer to a pointer, which is useless overhead.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
When erasing items from a linked list while iterating it, it is good
practice (and safer and sometimes faster) to use the erase() return
value instead of incrementing the iterator.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
@batrick
Copy link
Member

batrick commented Oct 9, 2024

jenkins test api

@batrick
Copy link
Member

batrick commented Oct 9, 2024

jenkins test make check arm64

2 similar comments
@batrick
Copy link
Member

batrick commented Oct 10, 2024

jenkins test make check arm64

@batrick
Copy link
Member

batrick commented Oct 10, 2024

jenkins test make check arm64

@markhpc markhpc changed the title Small MDS optimizations MDS: Small optimizations Oct 10, 2024
@batrick
Copy link
Member

batrick commented Oct 10, 2024

jenkins test make check arm64

@batrick
Copy link
Member

batrick commented Oct 19, 2024

This PR is under test in https://tracker.ceph.com/issues/68629.

batrick added a commit to batrick/ceph that referenced this pull request Oct 19, 2024
* refs/pull/60214/head:
	mds/MDCache: use `auto`
	mds/CDir: use the erase() return value
	mds/MDCache: remove unnecessary empty() check
	mds/MDCache: use the erase() return value
	mds/MDCache: pass iterator by value
@batrick
Copy link
Member

batrick commented Oct 22, 2024

@batrick batrick merged commit 35c0078 into ceph:main Oct 22, 2024
@MaxKellermann MaxKellermann deleted the mds_optimizations branch October 22, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants