From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756056AbcE0QIZ (ORCPT ); Fri, 27 May 2016 12:08:25 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:34147 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752880AbcE0QIY (ORCPT ); Fri, 27 May 2016 12:08:24 -0400 Date: Fri, 27 May 2016 12:08:22 -0400 From: Tejun Heo To: Konrad Rzeszutek Wilk Cc: Bhaktipriya Shridhar , boris.ostrovsky@oracle.com, david.vrabel@citrix.com, jgross@suse.com, JBeulich@suse.com, paul.gortmaker@windriver.com, stefano.stabellini@eu.citrix.com, cardoe@cardoe.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen: xen-pciback: Remove create_workqueue Message-ID: <20160527160822.GO23194@mtj.duckdns.org> References: <20160527155411.GA18039@Karyakshetra> <20160527160114.GB1842@char.us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160527160114.GB1842@char.us.oracle.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, May 27, 2016 at 12:01:14PM -0400, Konrad Rzeszutek Wilk wrote: > On Fri, May 27, 2016 at 09:24:11PM +0530, Bhaktipriya Shridhar wrote: > > With concurrency managed workqueues, use of dedicated workqueues can be > > replaced by using system_wq. Drop host->intr_wq by using ^ xen_pcibk_wq > > system_wq. > > > > Since there is only a single work item, increase of concurrency level by > > switching to system_wq should not break anything. > > _should_ not? Hehe. I presume this has not been tested? Yeah, this is a part of sweeping conversions and it's challenging (and often impossible for specific drivers) to setup test environments. xen isn't as bad but can still be a pretty specialized setup. The conversions aren't high risk and shouldn't be too difficult to root cause when something goes south. We'd greatly appreciate any helps with reviewing and testing. > > cancel_work_sync() has been used in xen_pcibk_disconnect() to ensure that > > work item is not pending or executing by the time exit path runs. > > > > Signed-off-by: Bhaktipriya Shridhar > > @@ -76,8 +75,7 @@ static void xen_pcibk_disconnect(struct xen_pcibk_device *pdev) > > /* If the driver domain started an op, make sure we complete it > > * before releasing the shared memory */ > > > > - /* Note, the workqueue does not use spinlocks at all.*/ > > - flush_workqueue(xen_pcibk_wq); > > + cancel_work_sync(&pdev->op_work); Should it be flush_work() instead? Is it okay for a pdev->op_work to be queued and canceled without actually getting executed? Thanks. -- tejun