Skip to content

Re-embed multilist_t storage. #12158

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

Merged
merged 1 commit into from
Jun 10, 2021
Merged

Re-embed multilist_t storage. #12158

merged 1 commit into from
Jun 10, 2021

Conversation

amotin
Copy link
Member

@amotin amotin commented May 29, 2021

Before "7968 multi-threaded spa_sync()" commit multilists were stored
in caller's memory same as regular lists. It is not clear why it was
changed, considering that the structure is still public, but I found
it reduced performance by additional uncached pointer dereference.

This commit partially reverts the mentioned one and adds some cache
line alignments to separate read-only multilists and heavily modified
refcount's to different cache lines.

How Has This Been Tested?

On 40-thread FreeBSD system heavy uncached 4KB reads from 8 ZVOLs show ~2% IOPS increase, while profiler shows reduction of time spent in dbuf_evict_one() and descendants from 8.2% to 6.8%.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@amotin amotin requested a review from ahrens May 29, 2021 19:14
@amotin amotin added the Status: Code Review Needed Ready for review and testing label May 29, 2021
@behlendorf
Copy link
Contributor

@amotin when you get a chance would you mind rebasing this on master. We've pulled in a couple FreeBSD change which should let us get a clean CI run on FreeBSD bots.

Before "7968 multi-threaded spa_sync()" commit multilists were stored
in caller's memory same as regular lists.  It is not clear why it was
changed, considering that the structure is still public, but I found
it reduced performance by additional uncached pointer dereference.

This commit partially reverts the mentioned one and adds some cache
line alignments to separate read-only multilists and heavily modified
refcount's to different cache lines.

Signed-off-by: Alexander Motin <[email protected]>
Sponsored-By: iXsystems, Inc.
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jun 8, 2021
@mmaybee mmaybee merged commit ffdf019 into openzfs:master Jun 10, 2021
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 10, 2021
This commit partially reverts changes to multilists in PR 7968
(multi-threaded spa-sync()) and adds some cache line alignments to
separate read-only multilists and heavily modified refcount's to
different cache lines.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-by: iXsystems, Inc.
Closes openzfs#12158
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jun 10, 2021
This commit partially reverts changes to multilists in PR 7968
(multi-threaded spa-sync()) and adds some cache line alignments to
separate read-only multilists and heavily modified refcount's to
different cache lines.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored-by: iXsystems, Inc.
Closes openzfs#12158
@amotin amotin deleted the ml branch August 24, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants