Re: [PATCH] mac80211: redefine usage of the mac80211 workqueue

Johannes Berg
2009-07-25T08:35:18Z

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Fri, 2009-07-24 at 20:47 -0400, Luis R. Rodriguez wrote:
> The mac80211 workqueue exists to enable mac80211 and drivers
> to queue their own work on a single threaded workqueue. mac80211
> takes care to flush the workqueue during suspend but we never
> really had requirements on drivers for how they should use
> the workqueue in consideration for suspend.
>
> We extend mac80211 to document how the mac80211 workqueue should
> be used, how it should not be used and finally move raw access to
> the workqueue to mac80211 only. Drivers and mac80211 use helpers
> to queue work and flush the mac80211 workqueue:
>
> * ieee80211_queue_work()
> * ieee80211_queue_delayed_work()
> * ieee80211_flush_workqueue()

I would prefer to have wait_on_work() and/or cancel_work_sync() instead
of flushing? It's often preferable due to locking constraints to
cancel_work_sync() instead of flush_workqueue(). Do people really need
flush_workqueue()?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]