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)
Wed, Jul 10, 1:07 PM
Unknown Object (File)
Fri, Jun 28, 1:19 PM
Unknown Object (File)
Apr 24 2024, 1:09 AM
Unknown Object (File)
Mar 17 2024, 9:54 PM
Unknown Object (File)
Jan 28 2024, 1:41 PM
Unknown Object (File)
Dec 23 2023, 8:48 PM
Unknown Object (File)
Dec 20 2023, 5:46 AM
Unknown Object (File)
Nov 29 2023, 7:15 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