Page MenuHomeFreeBSD

cxgbe netmap: Micro optimizations of the rxsync function
AcceptedPublic

Authored by bwicht_verisign.com on Nov 6 2018, 12:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 2, 7:48 AM
Unknown Object (File)
Fri, Apr 18, 6:47 PM
Unknown Object (File)
Thu, Apr 17, 10:07 AM
Unknown Object (File)
Sun, Apr 6, 11:56 AM
Unknown Object (File)
Mar 16 2025, 7:57 PM
Unknown Object (File)
Feb 25 2025, 9:30 PM
Unknown Object (File)
Jan 23 2025, 6:55 PM
Unknown Object (File)
Dec 22 2024, 12:39 PM
Subscribers

Details

Reviewers
np
vmaffione
Summary
  • Modifying slot->flags only when needed improves by ~10% max receive packet/sec
  • Remove assertions in the hot path
  • Improve branch prediction

Submitted by: Marc De La Gueronniere <mdelagueronniere@verisign.com>
MFC after: 1 week
Sponsored by: Verisign, Inc.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20680
Build 20095: arc lint + arc unit

Event Timeline

+Vincenzo for the netmap_kern.h part.

sys/dev/cxgbe/t4_netmap.c
915

The assertions shouldn't affect non-debug kernels. I think this one should not be removed.

916

Is this prediction applicable across the board or only for a certain type of workload?

I have restored the assertions.

sys/dev/cxgbe/t4_netmap.c
915

You are right. I restored the assertions. We have been a bit too far in the change.

916

We are confident that this change will not degrade performance on any load.
Our 10% improvement was seen with a very-high load of receive traffic with small packets.

The changes to netmap_kern.h look very good, thanks.

sys/dev/cxgbe/t4_netmap.c
916

This looks interesting. We were wondering wether the improvement comes from the __predict_false or from skipping the memory write operation. This information could be useful in other parts of netmap.

Have you tried the two changes independently?

This revision is now accepted and ready to land.Nov 7 2018, 10:28 AM
bwicht_verisign.com added inline comments.
sys/dev/cxgbe/t4_netmap.c
916

Unfortunately, we have not.

Il giorno gio 8 nov 2018 alle ore 16:43 bwicht_verisign.com (Baptiste
Wicht) <phabric-noreply@freebsd.org> ha scritto:

bwicht_verisign.com marked 2 inline comments as done.
bwicht_verisign.com added inline comments.

INLINE COMMENTS

v.maffione_gmail.com wrote in t4_netmap.c:913
This looks interesting. We were wondering wether the improvement comes

from the __predict_false or from skipping the memory write operation. This
information could be useful in other parts of netmap.

Have you tried the two changes independently?

Unfortunately, we have not.

Ok, it does not matter.

CHANGES SINCE LAST ACTION

https://reviews.freebsd.org/D17868/new/

REVISION DETAIL

https://reviews.freebsd.org/D17868

EMAIL PREFERENCES

https://reviews.freebsd.org/settings/panel/emailpreferences/

To: bwicht_verisign.com, np, v.maffione_gmail.com
Cc: jch, ae