From: David Vrabel <david.vrabel@citrix.com>
To: Aurelien Chartier <aurelien.chartier@citrix.com>
Cc: konrad.wilk@oracle.com, xen-devel@lists.xensource.com,
ian.campbell@citrix.com, JBeulich@suse.com,
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 11:09:18 +0100 [thread overview]
Message-ID: <51920D4E.9060906@citrix.com> (raw)
In-Reply-To: <1368450793-10030-3-git-send-email-aurelien.chartier@citrix.com>
On 13/05/13 14:13, Aurelien Chartier wrote:
> If the xenbus frontend is located in a domain running xenstored, the device
> resume is hanging because it is happening before the process resume. This
> patch adds extra logic to the resume code to check if we are the domain
> running xenstored and delay the resume if needed.
Would this be better done at the bus level instead of per-device?
> --- a/drivers/xen/xenbus/xenbus_probe_frontend.c
> +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
> @@ -89,9 +89,33 @@ static void backend_changed(struct xenbus_watch *watch,
> xenbus_otherend_changed(watch, vec, len, 1);
> }
>
> +static void xenbus_frontend_delayed_resume(struct work_struct *w)
> +{
> + struct xenbus_device *xdev = container_of(w, struct xenbus_device, work);
> +
> + xenbus_dev_resume(&xdev->dev);
> +}
> +
> +static int xenbus_frontend_dev_resume(struct device *dev)
> +{
> + /*
> + * If xenstored is running in that domain, we cannot access the backend
> + * state at the moment, so we need to defer xenbus_dev_resume
> + */
I think you mean "If xenstored is running in /this/ domain, we cannot
access the backend state at the moment..."
> + 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.
David
next prev parent reply other threads:[~2013-05-14 10:09 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 [this message]
2013-05-14 13:04 ` Aurelien Chartier
2013-05-14 13:38 ` David Vrabel
2013-05-14 13:54 ` Aurelien Chartier
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=51920D4E.9060906@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=aurelien.chartier@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=stefano.stabellini@eu.citrix.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.