public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Tejun Heo <tj@kernel.org>
Cc: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
	<boris.ostrovsky@oracle.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
Date: Tue, 31 May 2016 11:11:57 +0100	[thread overview]
Message-ID: <574D636D.9010104@citrix.com> (raw)
In-Reply-To: <20160527163201.GB2975@char.us.oracle.com>

On 27/05/16 17:32, Konrad Rzeszutek Wilk wrote:
> On Fri, May 27, 2016 at 12:08:22PM -0400, Tejun Heo wrote:
>> 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 <bhaktipriya96@gmail.com>
>>>> @@ -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?
> 
> It should really flush them. The comment above says so, but in reality it
> does not matter that much as we tearing down the communication. As long as
> the pdev->op_work either completes or is never executed - we are fine.

The comment should be updated to reflect this.

David

      reply	other threads:[~2016-05-31 10:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27 15:54 [PATCH] xen: xen-pciback: Remove create_workqueue Bhaktipriya Shridhar
2016-05-27 16:01 ` Konrad Rzeszutek Wilk
2016-05-27 16:08   ` Tejun Heo
2016-05-27 16:32     ` Konrad Rzeszutek Wilk
2016-05-31 10:11       ` David Vrabel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574D636D.9010104@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=bhaktipriya96@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=cardoe@cardoe.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tj@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox