From: Aurelien Chartier <aurelien.chartier@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: "konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"JBeulich@suse.com" <JBeulich@suse.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH V3 2/2] xenbus: delay xenbus frontend resume is xenstored is not running
Date: Tue, 14 May 2013 14:54:13 +0100 [thread overview]
Message-ID: <51924205.70207@citrix.com> (raw)
In-Reply-To: <51923E64.40903@citrix.com>
On 14/05/13 14:38, David Vrabel wrote:
>
>>>> + if (xen_store_domain == XS_LOCAL) {
>>>> + struct xenbus_device *xdev = to_xenbus_device(dev);
>>>> +
>>>> + INIT_WORK(&xdev->work, xenbus_frontend_delayed_resume);
>>>> + schedule_work(&xdev->work);
>>> How does this ensure xenstored is running when the work is scheduled?
>>> Will it end up blocking on a system workqueue until xenstored is
>>> running? That would be bad.
>> Yes, that will be blocked until xenstored process has been resumed,
>> since it is the current behavior. However, as the process resume is now
>> happening in parallel, it will only stay blocked for a very short period
>> of time.
> This may cause deadlocks.
>
> It used to be that a work item could block the execution of other work
> on that workqueue by sleeping or not completing, but workqueues have
> changed quite a bit since I last looked at them detail so this might not
> be the case any more.
>
> As resuming N devices queues N work items this can cause N worker
> threads to block. Is it guaranteed that the kernel can continue to
> create more workers to handle any work items required before xenstored
> can start?
>
> The safe and obviously correct method would be to create a dedicated
> workqueue for this resume work.
Ok, I get your point. I used a dedicated workqueue in my previous patch
but switched to use schedule_work, since I thought it was not worth
having a dedicated one. I'll switch back to that in the v4.
Thanks,
Aurelien
prev parent reply other threads:[~2013-05-14 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 13:13 [PATCH V3 0/2] xenbus: Fix S3 frontend resume when xenstored is not running Aurelien Chartier
2013-05-13 13:13 ` [PATCH V3 1/2] xenbus: save xenstore local status for later use Aurelien Chartier
2013-05-14 10:17 ` David Vrabel
2013-05-14 13:07 ` Aurelien Chartier
2013-05-13 13:13 ` [PATCH V3 2/2] xenbus: delay xenbus frontend resume is xenstored is not running Aurelien Chartier
2013-05-14 10:09 ` David Vrabel
2013-05-14 13:04 ` Aurelien Chartier
2013-05-14 13:38 ` David Vrabel
2013-05-14 13:54 ` Aurelien Chartier [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=51924205.70207@citrix.com \
--to=aurelien.chartier@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.