From: Bob Liu <bob.liu@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, roger.pau@citrix.com
Subject: Re: blkback feature announcement
Date: Tue, 08 Dec 2015 19:06:32 +0800 [thread overview]
Message-ID: <5666B9B8.9010100@oracle.com> (raw)
In-Reply-To: <56669F2B02000078000BD096@prv-mh.provo.novell.com>
On 12/08/2015 04:13 PM, Jan Beulich wrote:
>>>> On 08.12.15 at 02:08, <bob.liu@oracle.com> wrote:
>> On 12/07/2015 08:42 PM, Roger Pau Monné wrote:
>>> El 07/12/15 a les 13.00, Jan Beulich ha escrit:
>>>> Hello,
>>>>
>>>> is there a particular reason why "max-ring-page-order" gets written in
>>>> xen_blkbk_probe(), but e.g. "feature-max-indirect-segments" and
>>>> "feature-persistent" get written only in connect(), despite both having
>>>> constant values (and hence the node value effectively being known as
>>>> soon as the device exists)?
>>>
>>> No, AFAIK there's no specific reason.
>>>
>>
>> AFAIR, that's for the blkfront resume path.
>>
>> We need to get the "max-ring-page-order" in blkfront_resume() in advance, so
>> that we can know how many ring pages to be used before setup_blkring().
>
> I don't follow - the proposal is to have the backend announce the
> feature _earlier_, so how could frontend resume be affected?
>
The frontend resume is like this:
blkfront_resume()
> blkif_free()
> talk_to_blkback()
> setup_blkring() etc.
blkback_changed()
> blkfront_connect()
Sometimes the "max-ring-page-order" of backend may have changed after the guest(frontend) migrated to a different machine,
the frontend must aware of this change so that have to get the new value of "max-ring-page-order" in blkfront_resume().
But it would be too late if the backend announces the "max-ring-page-order" in connect(), this situation is like:
blkfront_resume()
> blkif_free()
> talk_to_blkback()
^^^ Get a wrong "max-ring-page-order"
> setup_blkring() etc. but using the wrong value!!
blkback_changed()
> blkfront_connect()
^^^ Then the connect() in backend will be called(after frontend enter XenbusStateConnected) and write the correct "max-ring-page-order", but it's too late.
Bob
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-12-08 11:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 12:00 blkback feature announcement Jan Beulich
2015-12-07 12:42 ` Roger Pau Monné
2015-12-07 14:54 ` Konrad Rzeszutek Wilk
2015-12-08 1:08 ` Bob Liu
2015-12-08 8:13 ` Jan Beulich
2015-12-08 11:06 ` Bob Liu [this message]
2015-12-08 11:13 ` Jan Beulich
2015-12-08 11:20 ` Bob Liu
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=5666B9B8.9010100@oracle.com \
--to=bob.liu@oracle.com \
--cc=JBeulich@suse.com \
--cc=roger.pau@citrix.com \
--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 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.