Page MenuHomeFreeBSD

Some cache related optimizations
ClosedPublic

Authored by shurd on Sep 21 2017, 10:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 6, 11:02 PM
Unknown Object (File)
Fri, Sep 12, 9:12 PM
Unknown Object (File)
Fri, Sep 12, 6:22 PM
Unknown Object (File)
Jun 25 2025, 6:13 PM
Unknown Object (File)
Jun 21 2025, 8:28 AM
Unknown Object (File)
Jun 17 2025, 6:33 AM
Unknown Object (File)
Jun 15 2025, 10:02 AM
Unknown Object (File)
Jun 12 2025, 9:46 PM
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 Not Applicable
Unit
Tests Not Applicable

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.