[PATCH v2] cfg80211: Remove deprecated create_singlethread_workqueue
The workqueue "cfg80211_wq" is involved in cleanup, scan and event related works. It queues multiple work items >event_work, >dfs_update_channels_wk, _to_rdev(request->wiphy)->scan_done_wk, _to_rdev(wiphy)->sched_scan_results_wk, which require strict execution ordering. Hence, an ordered dedicated workqueue has been used. Since it's a wireless driver, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> --- net/wireless/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index d25c82b..2cd4563 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1218,7 +1218,7 @@ static int __init cfg80211_init(void) if (err) goto out_fail_reg; - cfg80211_wq = create_singlethread_workqueue("cfg80211"); + cfg80211_wq = alloc_ordered_workqueue("cfg80211", WQ_MEM_RECLAIM); if (!cfg80211_wq) { err = -ENOMEM; goto out_fail_wq; -- 2.1.4
Re: [PATCH] libertas_tf: Remove create_workqueue
Ping! Thanks, Bhaktipriya On Sun, Jun 12, 2016 at 4:17 AM, Tejun Heo <t...@kernel.org> wrote: > On Wed, Jun 08, 2016 at 01:38:53AM +0530, Bhaktipriya Shridhar wrote: >> alloc_workqueue replaces deprecated create_workqueue(). >> >> A dedicated workqueue has been used since the workitem (viz >> >cmd_work per priv, which maps to lbtf_cmd_work) is involved in >> actual command processing and may be used on a memory reclaim path. >> The workitems require forward progress under memory pressure and hence, >> WQ_MEM_RECLAIM has been set. Since there are only a fixed number of work >> items, explicit concurrency limit is unnecessary here. >> >> Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> > > Acked-by: Tejun Heo <t...@kernel.org> > > Thanks. > > -- > tejun -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libertas_tf: Remove create_workqueue
alloc_workqueue replaces deprecated create_workqueue(). A dedicated workqueue has been used since the workitem (viz >cmd_work per priv, which maps to lbtf_cmd_work) is involved in actual command processing and may be used on a memory reclaim path. The workitems require forward progress under memory pressure and hence, WQ_MEM_RECLAIM has been set. Since there are only a fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> --- drivers/net/wireless/marvell/libertas_tf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas_tf/main.c b/drivers/net/wireless/marvell/libertas_tf/main.c index 0bf8916..81463f7 100644 --- a/drivers/net/wireless/marvell/libertas_tf/main.c +++ b/drivers/net/wireless/marvell/libertas_tf/main.c @@ -742,7 +742,7 @@ EXPORT_SYMBOL_GPL(lbtf_bcn_sent); static int __init lbtf_init_module(void) { lbtf_deb_enter(LBTF_DEB_MAIN); - lbtf_wq = create_workqueue("libertastf"); + lbtf_wq = alloc_workqueue("libertastf", WQ_MEM_RECLAIM, 0); if (lbtf_wq == NULL) { printk(KERN_ERR "libertastf: couldn't create workqueue\n"); return -ENOMEM; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] net: wireless: marvell: libertas: Remove create_workqueue
On Sat, Jun 4, 2016 at 7:59 PM, Kalle Valowrote: > > $ git log --oneline --no-merges -10 Sure. Will keep that in mind. Thanks, Bhaktipriya -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] net: wireless: marvell: libertas: Remove create_workqueue
alloc_workqueue replaces deprecated create_workqueue(). In if_sdio.c, the workqueue card->workqueue has workitem >packet_worker, which is mapped to if_sdio_host_to_card_worker. The workitem is involved in sending packets to firmware. Forward progress under memory pressure is a requirement here. In if_spi.c, the workqueue card->workqueue has workitem >packet_worker, which is mapped to if_spi_host_to_card_worker. The workitem is involved in sending command packets from the host. Forward progress under memory pressure is a requirement here. Dedicated workqueues have been used in both cases since the workitems on the workqueues are involved in normal device operation with WQ_MEM_RECLAIM set to gurantee forward progress under memory pressure. Since there are only a fixed number of work items, explicit concurrency limit is unnecessary. flush_workqueue is unnecessary since destroy_workqueue() itself calls drain_workqueue() which flushes repeatedly till the workqueue becomes empty. Hence the calls to flush_workqueue() before destroy_workqueue() have been dropped. Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> --- drivers/net/wireless/marvell/libertas/if_sdio.c | 3 +-- drivers/net/wireless/marvell/libertas/if_spi.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c index 13eae9f..47f4a14 100644 --- a/drivers/net/wireless/marvell/libertas/if_sdio.c +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c @@ -1228,7 +1228,7 @@ static int if_sdio_probe(struct sdio_func *func, } spin_lock_init(>lock); - card->workqueue = create_workqueue("libertas_sdio"); + card->workqueue = alloc_workqueue("libertas_sdio", WQ_MEM_RECLAIM, 0); INIT_WORK(>packet_worker, if_sdio_host_to_card_worker); init_waitqueue_head(>pwron_waitq); @@ -1326,7 +1326,6 @@ static void if_sdio_remove(struct sdio_func *func) lbs_stop_card(card->priv); lbs_remove_card(card->priv); - flush_workqueue(card->workqueue); destroy_workqueue(card->workqueue); while (card->packets) { diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c b/drivers/net/wireless/marvell/libertas/if_spi.c index 82c0796..c3a53cd 100644 --- a/drivers/net/wireless/marvell/libertas/if_spi.c +++ b/drivers/net/wireless/marvell/libertas/if_spi.c @@ -1180,7 +1180,7 @@ static int if_spi_probe(struct spi_device *spi) priv->fw_ready = 1; /* Initialize interrupt handling stuff. */ - card->workqueue = create_workqueue("libertas_spi"); + card->workqueue = alloc_workqueue("libertas_spi", WQ_MEM_RECLAIM, 0); INIT_WORK(>packet_work, if_spi_host_to_card_worker); INIT_WORK(>resume_work, if_spi_resume_worker); @@ -1208,7 +1208,6 @@ static int if_spi_probe(struct spi_device *spi) release_irq: free_irq(spi->irq, card); terminate_workqueue: - flush_workqueue(card->workqueue); destroy_workqueue(card->workqueue); lbs_remove_card(priv); /* will call free_netdev */ free_card: @@ -1235,7 +1234,6 @@ static int libertas_spi_remove(struct spi_device *spi) lbs_remove_card(priv); /* will call free_netdev */ free_irq(spi->irq, card); - flush_workqueue(card->workqueue); destroy_workqueue(card->workqueue); if (card->pdata->teardown) card->pdata->teardown(spi); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: rtl8723au: Fixes unnecessary return warning
This patch fixes checkpatch.pl warning in rtw_mlme_ext.c file. WARNING: void function return statements are not generally useful Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index d28f29a..e8a16b9 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2657,7 +2657,6 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da) dump_mgntframe23a(padapter, pmgntframe); - return; } static int _issue_probereq(struct rtw_adapter *padapter, @@ -2958,7 +2957,6 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, DBG_8723A("%s\n", __func__); dump_mgntframe23a(padapter, pmgntframe); - return; } #ifdef CONFIG_8723AU_AP_MODE @@ -3339,7 +3337,6 @@ exit: } else kfree(pmlmepriv->assoc_req); - return; } /* when wait_ack is true, this function should be called at process context */ @@ -4103,7 +4100,6 @@ static void rtw_site_survey(struct rtw_adapter *padapter) pmlmeext->sitesurvey_res.state = SCAN_DISABLE; } - return; } /* collect bss info from Beacon and Probe request/response frames. */ @@ -4760,7 +4756,6 @@ void report_survey_event23a(struct rtw_adapter *padapter, pmlmeext->sitesurvey_res.bss_cnt++; - return; } void report_surveydone_event23a(struct rtw_adapter *padapter) @@ -4803,7 +4798,6 @@ void report_surveydone_event23a(struct rtw_adapter *padapter) rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - return; } void report_join_res23a(struct rtw_adapter *padapter, int res) @@ -4851,7 +4845,6 @@ void report_join_res23a(struct rtw_adapter *padapter, int res) rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - return; } void report_del_sta_event23a(struct rtw_adapter *padapter, @@ -4907,7 +4900,6 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - return; } void report_add_sta_event23a(struct rtw_adapter *padapter, @@ -4952,7 +4944,6 @@ void report_add_sta_event23a(struct rtw_adapter *padapter, rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - return; } / @@ -5395,7 +5386,6 @@ static void link_timer_hdl(unsigned long data) set_link_timer(pmlmeext, REASSOC_TO); } - return; } static void addba_timer_hdl(unsigned long data) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] staging: rtl8723au: Fixes unnecessary return warning
This patch fixes checkpatch.pl warning in rtw_mlme_ext.c file. WARNING: void function return statements are not generally useful Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> --- Changes in v2: - Removed the unnecessary blank lines. drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 20 1 file changed, 20 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index d28f29a..7cd0052 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2656,8 +2656,6 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da) pattrib->last_txcmdsz = pattrib->pktlen; dump_mgntframe23a(padapter, pmgntframe); - - return; } static int _issue_probereq(struct rtw_adapter *padapter, @@ -2957,8 +2955,6 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, rtw_wep_encrypt23a(padapter, pmgntframe); DBG_8723A("%s\n", __func__); dump_mgntframe23a(padapter, pmgntframe); - - return; } #ifdef CONFIG_8723AU_AP_MODE @@ -3338,8 +3334,6 @@ exit: } } else kfree(pmlmepriv->assoc_req); - - return; } /* when wait_ack is true, this function should be called at process context */ @@ -4102,8 +4096,6 @@ static void rtw_site_survey(struct rtw_adapter *padapter) pmlmeext->chan_scan_time = SURVEY_TO; pmlmeext->sitesurvey_res.state = SCAN_DISABLE; } - - return; } /* collect bss info from Beacon and Probe request/response frames. */ @@ -4759,8 +4751,6 @@ void report_survey_event23a(struct rtw_adapter *padapter, rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); pmlmeext->sitesurvey_res.bss_cnt++; - - return; } void report_surveydone_event23a(struct rtw_adapter *padapter) @@ -4802,8 +4792,6 @@ void report_surveydone_event23a(struct rtw_adapter *padapter) DBG_8723A("survey done event(%x)\n", psurveydone_evt->bss_cnt); rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - - return; } void report_join_res23a(struct rtw_adapter *padapter, int res) @@ -4850,8 +4838,6 @@ void report_join_res23a(struct rtw_adapter *padapter, int res) rtw_joinbss_event_prehandle23a(padapter, (u8 *)_evt->network); rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - - return; } void report_del_sta_event23a(struct rtw_adapter *padapter, @@ -4906,8 +4892,6 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, DBG_8723A("report_del_sta_event23a: delete STA, mac_id =%d\n", mac_id); rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - - return; } void report_add_sta_event23a(struct rtw_adapter *padapter, @@ -4951,8 +4935,6 @@ void report_add_sta_event23a(struct rtw_adapter *padapter, DBG_8723A("report_add_sta_event23a: add STA\n"); rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj); - - return; } / @@ -5394,8 +5376,6 @@ static void link_timer_hdl(unsigned long data) issue_assocreq(padapter); set_link_timer(pmlmeext, REASSOC_TO); } - - return; } static void addba_timer_hdl(unsigned long data) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html