Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935951AbcCQMpO (ORCPT ); Thu, 17 Mar 2016 08:45:14 -0400 Received: from mga01.intel.com ([192.55.52.88]:17683 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbcCQMpJ convert rfc822-to-8bit (ORCPT ); Thu, 17 Mar 2016 08:45:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,350,1455004800"; d="scan'208";a="939314661" From: "Grumbach, Emmanuel" To: Eva Rachel Retuya , "outreachy-kernel@googlegroups.com" CC: "Berg, Johannes" , linuxwifi , "kvalo@codeaurora.org" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "tj@kernel.org" Subject: RE: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue() Thread-Topic: [PATCH] iwlwifi: dvm: convert create_singlethread_workqueue() to alloc_workqueue() Thread-Index: AQHRgEoAWoUtPjl8sU+butlH+LfA3Z9dlBnw Date: Thu, 17 Mar 2016 12:43:35 +0000 Message-ID: <0BA3FCBA62E2DC44AF3030971E174FB32EA7C435@hasmsx107.ger.corp.intel.com> References: <1458218246-18807-1-git-send-email-eraretuya@gmail.com> In-Reply-To: <1458218246-18807-1-git-send-email-eraretuya@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTU2MDkwZTAtZTQ2OS00MWMwLTgzOWMtMWIzMDYwZWE1MWYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkRpcEZQamhRSldQVGMzSUEzZFhYcWdzdHVOdUFpTlRVZUdpdEV0U0NIUTA9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1950 Lines: 55 > > Use alloc_workqueue() to allocate the workqueue instead of > create_singlethread_workqueue() since the latter is deprecated and is > scheduled > for removal. I can't see any indication of that in the code of workqueue. Can you share details about that? > > There are work items doing related operations that shouldn't be swapped > when > queued in a certain order hence preserve the strict execution ordering of a > single threaded (ST) workqueue by setting max_active to 1 and adding the > WQ_UNBOUND flag. > > In addition, there are work items dealing with temperature throttling > (tt_work, > ct_enter, ct_exit). Adding the WQ_HIGHPRI flag would place the work items > in a > high priority workqueue. > > Lastly, guarantee forward progress for work items depended upon during > memory > reclaim by the addition of the WQ_MEM_RECLAIM flag. > > Signed-off-by: Eva Rachel Retuya > --- > To the maintainers: > Just to confirm, are work items depended upon during memory reclaim? If > not, the WQ_MEM_RECLAIM flag will be dropped. I added it just in case since > create_singlethread_workqueue() also sets this flag. > > drivers/net/wireless/intel/iwlwifi/dvm/main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c > b/drivers/net/wireless/intel/iwlwifi/dvm/main.c > index f62c2d7..37fa11c 100644 > --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c > +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c > @@ -1071,7 +1071,8 @@ static void iwl_bg_restart(struct work_struct *data) > > static void iwl_setup_deferred_work(struct iwl_priv *priv) > { > - priv->workqueue = create_singlethread_workqueue(DRV_NAME); > + priv->workqueue = alloc_workqueue(DRV_NAME, WQ_HIGHPRI | > WQ_UNBOUND | > + WQ_MEM_RECLAIM, 1); > > INIT_WORK(&priv->restart, iwl_bg_restart); > INIT_WORK(&priv->beacon_update, iwl_bg_beacon_update); > -- > 1.9.1