[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] blkback feature announcement



>>> On 08.12.15 at 12:06, <bob.liu@xxxxxxxxxx> wrote:

> On 12/08/2015 04:13 PM, Jan Beulich wrote:
>>>>> On 08.12.15 at 02:08, <bob.liu@xxxxxxxxxx> 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.

Oh, you're arguing for why "max-ring-page-order" is written early,
but the question really was why others aren't written early too.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.