Skip to content

MDS: Small optimizations - #60214

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

batrick merged 5 commits into
ceph:mainfrom
MaxKellermann:mds_optimizations

Conversation

@MaxKellermann

@MaxKellermann MaxKellermann commented Oct 9, 2024 •

Copy link
Copy Markdown
Member

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

@batrick batrick left a comment

Copy link
Copy Markdown
Member

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?

Comment thread src/mds/MDCache.cc Resolved
@MaxKellermann

Copy link
Copy Markdown
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Max Kellermann <[email protected]>
@batrick

batrick commented Oct 9, 2024

Copy link
Copy Markdown
Member

jenkins test api

@batrick

batrick commented Oct 9, 2024

Copy link
Copy Markdown
Member

jenkins test make check arm64

2 similar comments
@batrick

batrick commented Oct 10, 2024

Copy link
Copy Markdown
Member

jenkins test make check arm64

@batrick

batrick commented Oct 10, 2024

Copy link
Copy Markdown
Member

jenkins test make check arm64

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

batrick commented Oct 10, 2024

Copy link
Copy Markdown
Member

jenkins test make check arm64

@batrick

batrick commented Oct 19, 2024

Copy link
Copy Markdown
Member

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

batrick commented Oct 22, 2024

Copy link
Copy Markdown
Member

@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