mbox series

[RFC,v2,0/3] wifi locking simplification

Message ID 20230510201205.308542-1-johannes@sipsolutions.net
Headers show
Series wifi locking simplification | expand

Message

Johannes Berg May 10, 2023, 8:12 p.m. UTC
The rationale etc. didn't change in v2, so see
https://lore.kernel.org/r/20230510160428.175409-1-johannes@sipsolutions.net

In v2 I dropped the workqueue locking patch and consequently
made new wiphy_work and wiphy_delayed_work things.

I kept the pause/resume for the workqueue because not that I
had it, it seemed simpler than keeping track of "should it be
paused" in a separate bool variable to not queue the work when
it shouldn't be ...

Still just serves to illustrate things, I didn't really test it.

johannes

Comments

Tejun Heo May 10, 2023, 8:13 p.m. UTC | #1
On Wed, May 10, 2023 at 10:12:03PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Add some infrastructure to support pausing ordered
> workqueues, so that no work items are executing nor
> can execute while the workqueue is paused.
> 
> This can be used to simplify locking between work
> structs and other processes (e.g. userspace calls)
> when the workqueue is paused while other code is
> running, where we can then more easily avoid issues
> in code paths needing to cancel works.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I'd be happy to apply this once the rest of the patchset is ready.

Thanks.