From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752551AbcF2Mtl (ORCPT ); Wed, 29 Jun 2016 08:49:41 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:64425 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbcF2Mtk (ORCPT ); Wed, 29 Jun 2016 08:49:40 -0400 X-IronPort-AV: E=Sophos;i="5.26,546,1459814400"; d="scan'208";a="370347210" Subject: Re: [Xen-devel] [PATCH v2] xen: xen-pciback: Remove create_workqueue To: Bhaktipriya Shridhar , Boris Ostrovsky , David Vrabel , "Juergen Gross" , Konrad Rzeszutek Wilk , "Jan Beulich" , Stefano Stabellini , Paul Gortmaker , Doug Goldstein References: <20160601141508.GA27853@Karyakshetra> CC: Tejun Heo , , From: David Vrabel Message-ID: <5773C3DC.60804@citrix.com> Date: Wed, 29 Jun 2016 13:49:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160601141508.GA27853@Karyakshetra> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/06/16 15:15, Bhaktipriya Shridhar wrote: > System workqueues have been able to handle high level of concurrency > for a long time now and there's no reason to use dedicated workqueues > just to gain concurrency. Replace dedicated xen_pcibk_wq with the > use of system_wq. > > Unlike a dedicated per-cpu workqueue created with create_workqueue(), > system_wq allows multiple work items to overlap executions even on > the same CPU; however, a per-cpu workqueue doesn't have any CPU > locality or global ordering guarantees unless the target CPU is > explicitly specified and thus the increase of local concurrency shouldn't > make any difference. > > Since the work items could be pending, flush_work() has been used in > xen_pcibk_disconnect(). xen_pcibk_xenbus_remove() calls free_pdev() > which in turn calls xen_pcibk_disconnect() for every pdev to ensure that > there is no pending task while disconnecting the driver. Applied to for-linus-4.8, thanks. David