On Mon, 2009-02-16 at 02:09 -0800, Luis R. Rodriguez wrote: > > Maybe just use a spinlock for the list, and do the loop manually like in > > mac80211/key.c then? > > > > spin_lock(&todo_lock); > > while (!list_empty(&todo_list)) { > > key = list_first_entry(&todo_list, struct ieee80211_key, todo); > > list_del_init(&key->todo); > > spin_unlock(&todo_lock); > > ........ > > spin_lock(&todo_lock); > > } > > spin_unlock(&todo_lock); > > Sure, is the benefit you see that we won't contend userspace longer if > the workqueue is busy? No, just that it's simpler because we truly only use the spinlock for list accesses rather than holding a reg_mutex around the cfg80211 mutex. Thus we can queue things without needing the cfg80211 mutex, but dequeue needs to run under it. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part