* [RFT] rtlwifi: use alloc_workqueue
@ 2010-12-16 19:59 John W. Linville
2010-12-17 3:45 ` Larry Finger
2010-12-18 1:29 ` Larry Finger
0 siblings, 2 replies; 5+ messages in thread
From: John W. Linville @ 2010-12-16 19:59 UTC (permalink / raw)
To: linux-wireless; +Cc: Tejun Heo, Larry Finger, John W. Linville
create_workqueue is deprecated. The workqueue usage does not seem to
demand any special treatment, so do not set any flags either.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
I don't have the hardware to test...
drivers/net/wireless/rtlwifi/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 9e860ff..24a7cd3 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -225,7 +225,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
/* <2> work queue */
rtlpriv->works.hw = hw;
- rtlpriv->works.rtl_wq = create_workqueue(rtlpriv->cfg->name);
+ rtlpriv->works.rtl_wq = alloc_workqueue(rtlpriv->cfg->name, 0, 0);
INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
(void *)rtl_watchdog_wq_callback);
INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
--
1.7.3.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFT] rtlwifi: use alloc_workqueue
2010-12-16 19:59 [RFT] rtlwifi: use alloc_workqueue John W. Linville
@ 2010-12-17 3:45 ` Larry Finger
2010-12-17 9:57 ` Tejun Heo
2010-12-18 1:29 ` Larry Finger
1 sibling, 1 reply; 5+ messages in thread
From: Larry Finger @ 2010-12-17 3:45 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Tejun Heo
On 12/16/2010 01:59 PM, John W. Linville wrote:
> create_workqueue is deprecated. The workqueue usage does not seem to
> demand any special treatment, so do not set any flags either.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> I don't have the hardware to test...
Hold off on this one. It seems to break the driver, but I do not know why just yet.
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFT] rtlwifi: use alloc_workqueue
2010-12-17 3:45 ` Larry Finger
@ 2010-12-17 9:57 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2010-12-17 9:57 UTC (permalink / raw)
To: Larry Finger; +Cc: John W. Linville, linux-wireless
Hello,
On 12/17/2010 04:45 AM, Larry Finger wrote:
> On 12/16/2010 01:59 PM, John W. Linville wrote:
>> create_workqueue is deprecated. The workqueue usage does not seem to
>> demand any special treatment, so do not set any flags either.
>>
>> Signed-off-by: John W. Linville <linville@tuxdriver.com>
>> ---
>> I don't have the hardware to test...
>
> Hold off on this one. It seems to break the driver, but I do not
> know why just yet.
There are two differences between create_workqueue(name) and
alloc_workqueue(name, 0, 0).
* The former has WQ_MEM_RECLAIM set and forward progress is guaranteed
regardless of memory pressure. In this case, this shouldn't make
any difference.
* The former has @max_active set to 1 while the latter to
WQ_DFL_ACTIVE. IOW, works queued on the same CPU would be allowed
to run concurrently while before conversion only different CPUs can
run works queued to the workqueue in parallel. This usually
shouldn't make difference either as works could have run in parallel
on different CPUs before too.
Does alloc_workqueue(name, 0, 1) fix the problem? If so, it might be
that the current workqueue usage has problem too.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFT] rtlwifi: use alloc_workqueue
2010-12-16 19:59 [RFT] rtlwifi: use alloc_workqueue John W. Linville
2010-12-17 3:45 ` Larry Finger
@ 2010-12-18 1:29 ` Larry Finger
2010-12-18 7:13 ` Tejun Heo
1 sibling, 1 reply; 5+ messages in thread
From: Larry Finger @ 2010-12-18 1:29 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Tejun Heo
On 12/16/2010 01:59 PM, John W. Linville wrote:
> create_workqueue is deprecated. The workqueue usage does not seem to
> demand any special treatment, so do not set any flags either.
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> I don't have the hardware to test...
>
> drivers/net/wireless/rtlwifi/base.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
> index 9e860ff..24a7cd3 100644
> --- a/drivers/net/wireless/rtlwifi/base.c
> +++ b/drivers/net/wireless/rtlwifi/base.c
> @@ -225,7 +225,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
>
> /* <2> work queue */
> rtlpriv->works.hw = hw;
> - rtlpriv->works.rtl_wq = create_workqueue(rtlpriv->cfg->name);
> + rtlpriv->works.rtl_wq = alloc_workqueue(rtlpriv->cfg->name, 0, 0);
> INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
> (void *)rtl_watchdog_wq_callback);
> INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
After further testing, this patch is OK. The problem I saw had another source.
Add Tested-by: Larry Finger
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-18 7:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 19:59 [RFT] rtlwifi: use alloc_workqueue John W. Linville
2010-12-17 3:45 ` Larry Finger
2010-12-17 9:57 ` Tejun Heo
2010-12-18 1:29 ` Larry Finger
2010-12-18 7:13 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).