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

Using exclusive mode prefetch #627

Merged
merged 6 commits into from
Aug 9, 2023
Merged

Using exclusive mode prefetch #627

merged 6 commits into from
Aug 9, 2023

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented Aug 2, 2023

The prefetching is always used to move the cache line to the current core for writing. This change makes it use exclusive mode prefetch and enables it as a feature flag for x64.

The prefetching is always used to move the cache line to the current
core for writing.  This change makes it use exclusive mode prefetch
and enables it as a feature flag for x64.
@mjp41
Copy link
Member Author

mjp41 commented Aug 2, 2023

Most benchmarks don't show a difference in mimalloc-bench, but which is heavily producer consumer is around 5% faster.

xmalloc-testN sn-prefetchr 0.202 266232 190.71 38.13 4 36155
xmalloc-testN sn-prefetchw 0.188 278588 192.37 37.22 6 32462
xmalloc-testN sn-prefetchr 0.202 283372 191.57 42.99 21 37615
xmalloc-testN sn-prefetchw 0.189 258012 186.98 42.39 41 39832
xmalloc-testN sn-prefetchr 0.199 276532 194.81 39.12 54 42775
xmalloc-testN sn-prefetchw 0.186 275996 192.95 38.01 0 38266
xmalloc-testN sn-prefetchr 0.201 282280 190.72 38.75 7 42319
xmalloc-testN sn-prefetchw 0.188 276616 189.45 40.59 55 38771
xmalloc-testN sn-prefetchr 0.201 249948 189.32 40.96 0 39287
xmalloc-testN sn-prefetchw 0.186 274604 195.47 34.73 8 36765
xmalloc-testN sn-prefetchr 0.202 272520 190.24 41.92 34 38657
xmalloc-testN sn-prefetchw 0.186 283648 194.17 35.73 46 42787
xmalloc-testN sn-prefetchr 0.202 221424 184.45 49.19 0 43727
xmalloc-testN sn-prefetchw 0.189 274420 190.00 40.81 1 34877
xmalloc-testN sn-prefetchr 0.202 268268 191.08 39.68 42 39695
xmalloc-testN sn-prefetchw 0.188 274436 192.79 35.84 0 35973
xmalloc-testN sn-prefetchr 0.202 254872 187.74 42.88 28 39420
xmalloc-testN sn-prefetchw 0.187 276372 191.79 38.79 18 38002
xmalloc-testN sn-prefetchr 0.201 274560 191.95 41.81 23 34473
xmalloc-testN sn-prefetchw 0.188 285448 192.93 38.21 0 38145

@mjp41 mjp41 requested a review from nwf-msr August 7, 2023 16:06
Copy link
Contributor

@nwf-msr nwf-msr left a comment

Choose a reason for hiding this comment

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

LGTM; thanks for taking the time to chat about this a few days ago

@mjp41 mjp41 merged commit c2e4a12 into microsoft:main Aug 9, 2023
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants