Search Linux Wireless

Re: [PATCH] ath6kl: avoid flush_scheduled_work() usage

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

 



On 2022/06/11 4:10, Jeff Johnson wrote:
> On 6/10/2022 12:05 PM, Jeff Johnson wrote:
>>> +static int __init ath6kl_init(void)
>>> +{
>>> +    int ret;
>>> +
>>> +    ath6kl_wq = alloc_workqueue("ath6kl_wq", 0, 0);
>>> +    if (!ath6kl_wq)
>>> +        return -ENOMEM;
>>
>> this approach means the driver will always allocate a workqueue even if the associated hardware is never present.

Creating a WQ without WQ_MEM_RECLAIM flag consumes little resource.

>>
>> did you consider instead having the allocation take place within the processing of ath6kl_usb_probe() and the destroy take place within the processing of ath6kl_usb_pm_remove()?
> 
> typo: ath6kl_usb_pm_remove() => ath6kl_usb_remove()

Technically possible to use ath6kl_usb_create()/ath6kl_usb_destroy() if you prefer it.

Do you want ath6kl_wq be shared within this module (using a refcount), or be local to
each "struct ath6kl_usb" (adding a member and accessing via usb_get_intfdata()) ?




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux