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)
Thu, Apr 11, 6:16 PM
Unknown Object (File)
Thu, Apr 11, 10:42 AM
Unknown Object (File)
Tue, Apr 9, 1:47 PM
Unknown Object (File)
Mar 7 2024, 6:21 PM
Unknown Object (File)
Mar 6 2024, 9:49 AM
Unknown Object (File)
Feb 23 2024, 12:41 PM
Unknown Object (File)
Feb 8 2024, 10:18 AM
Unknown Object (File)
Dec 23 2023, 3:06 AM

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #77561)

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.