Search Linux Wireless

Re: [PATCH 09/10] cfg80211: move regulatory hints to workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 16, 2009 at 1:55 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2009-02-16 at 01:48 -0800, Luis R. Rodriguez wrote:
>
>> > Are you sure the mutex order reg_mutex --> cfg80211_mutex is a good
>> > idea? Is there a need for two locks at all?
>>
>> I think so. So reg_mutex would prevent any new requests to be added
>> into the queue, that's the only thing that mutex protects. Once you
>> are sure you have no one adding requests to the queue you then need to
>> ensure no one is processing a regulatory request and hence the
>> cfg80211_mutex.
>>
>> We need to protect the queue from additions to the queue from having
>> the workqueue process it.
>
> 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?

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux