Page MenuHomeFreeBSD

rtwn: narrow the epoch area
ClosedPublic

Authored by bz on Sep 25 2020, 10:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 11:02 PM
Unknown Object (File)
Sun, May 5, 3:23 AM
Unknown Object (File)
Wed, May 1, 3:15 AM
Unknown Object (File)
Wed, Apr 24, 6:40 AM
Unknown Object (File)
Apr 11 2024, 6:16 PM
Unknown Object (File)
Apr 11 2024, 10:42 AM
Unknown Object (File)
Apr 9 2024, 1:47 PM
Unknown Object (File)
Mar 7 2024, 6:21 PM

Details

Summary

rtwn: narrow the epoch area

Rather than placing the epoch around the entire receive loop which
might call into rtwn_rx_frame() and USB and sleep, split the loop
into two and leave us with one unlock/lock cycle as well.

PR: 249925
Reported by:  thj, (rkoberman gmail.com)
Suggested by: adrian
Reviewed by:
Sponsored by:	The FreeBSD Foundation (initially)
Diff...:

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33811
Build 31028: arc lint + arc unit

Event Timeline

bz requested review of this revision.Sep 25 2020, 10:36 AM
bz created this revision.

I'm not a huge fan of this cause honestly we should be doing the epoch enter/exit around a batch.

What I was hoping to do was to create a list of frames from calls to rtwn_rx_frame and then push them up to the stack in a second pass under (a) no lock, avoiding the relock, and (b) being done in NET_EPOCH.

Wanna do that or should I?

I'm not a huge fan of this cause honestly we should be doing the epoch enter/exit around a batch.

What I was hoping to do was to create a list of frames from calls to rtwn_rx_frame and then push them up to the stack in a second pass under (a) no lock, avoiding the relock, and (b) being done in NET_EPOCH.

Wanna do that or should I?

I can; I have the code open and that's easy to do. I am still contemplating if acquiring the epoch in the driver code is the right thing.. but then all the epoch-ify-pushing-down has grinded to a halt.

Yeah, if we ever support pushing a list of receive frames into the net80211 stack, complete with rx status in the mbuf tags, then I think we can do this in net80211 quite nicely. :-)

Rework as suggested by adrian.

bz set the repository for this revision to rS FreeBSD src repository - subversion.
adrian added inline comments.
sys/dev/rtwn/usb/rtwn_usb_rx.c
406

Lol, why isn't this node assignment thingy a net80211 method? That's a cute hack.

This revision is now accepted and ready to land.Sep 26 2020, 7:17 PM
This revision was automatically updated to reflect the committed changes.