Page MenuHomeFreeBSD

Some cache related optimizations
ClosedPublic

Authored by shurd on Sep 21 2017, 10:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 25, 6:13 PM
Unknown Object (File)
Sat, Jun 21, 8:28 AM
Unknown Object (File)
Tue, Jun 17, 6:33 AM
Unknown Object (File)
Sun, Jun 15, 10:02 AM
Unknown Object (File)
Thu, Jun 12, 9:46 PM
Unknown Object (File)
Wed, Jun 11, 5:04 AM
Unknown Object (File)
Wed, Jun 11, 4:48 AM
Unknown Object (File)
Jun 3 2025, 1:35 AM
Subscribers

Details

Summary
  1. prefetch 128 bytes of mbufs.
  2. Re-order filling the pkt_info so cache stalls happen at the end
  3. Define empty prefetch2() macro when the function isn't present.

Provides small performance improvments on some hardware

Test Plan

Test on a wider range of hardware for regressions

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11667
Build 12013: arc lint + arc unit

Event Timeline

Is there a reason that we don't modify prefetch() instead of creating a new prefetch2() function?

Is there a reason that we don't modify prefetch() instead of creating a new prefetch2() function?

The majority of places prefetch() is used don't need the extra cacheline prefetched.

sbruno requested changes to this revision.Sep 27 2017, 6:47 PM

Ok, lets rename prefetch2() to something that indicates why there is a second function (being a bit pedantic here). something like prefetch_align() or whatever.

This revision now requires changes to proceed.Sep 27 2017, 6:47 PM

Ok, lets rename prefetch2() to something that indicates why there is a second function (being a bit pedantic here). something like prefetch_align() or whatever.

Do you like prefetch2cachelines() better?

Ok, lets rename prefetch2() to something that indicates why there is a second function (being a bit pedantic here). something like prefetch_align() or whatever.

Do you like prefetch2cachelines() better?

I think that's fine. It at least explains what's up with this function.

Rename prefecth2() to prefetch2cachelines()

This revision is now accepted and ready to land.Oct 23 2017, 7:00 PM
This revision was automatically updated to reflect the committed changes.