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

Re: [Xen-devel] [PATCH 4 of 4 v3] blkif.h: Define and document the request number/size/segments extension



On Feb 21, 2012, at 7:22 AM, Konrad Rzeszutek Wilk wrote:

> On Mon, Feb 20, 2012 at 11:07:25AM -0700, Justin T. Gibbs wrote:
>> Note: As of __XEN_INTERFACE_VERSION__ 0x00040201 the definition of
>>      BLKIF_MAX_SEGMENTS_PER_REQUEST has changed.  Drivers must be updated
>>      to, at minimum, use BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK, before being
>>      recompiled with a __XEN_INTERFACE_VERSION greater than or equal to
>>      this value.
>> 
>> This extension first appeared in the FreeBSD Operating System.
>> 
>> Signed-off-by: Justin T. Gibbs <justing@xxxxxxxxxxxxxxxx>
>> 
>> diff -r 09051133e2fe -r a777cbc5f48b xen/include/public/io/blkif.h
>> --- a/xen/include/public/io/blkif.h  Mon Feb 20 11:02:53 2012 -0700
>> +++ b/xen/include/public/io/blkif.h  Mon Feb 20 11:03:01 2012 -0700
>> @@ -145,6 +145,32 @@
>>  *      The maximum supported size of the request ring buffer in units of
>>  *      machine pages.  The value must be a power of 2.
>>  *
>> + * max-requests         <uint32_t>
>> + *      Default Value:  BLKIF_MAX_RING_REQUESTS(PAGE_SIZE)
>> + *      Maximum Value:  BLKIF_MAX_RING_REQUESTS(PAGE_SIZE * max-ring-pages)
>> + *
>> + *      The maximum number of concurrent, logical requests that will be
>> + *      issued by the backend.
> 
> Don't you mean responses?

No, but it is poorly worded.  See my reply to Ian C.

>> + * max-request-size
>> + *      Values:         <uint32_t>
>> + *      Default Value:  BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK * PAGE_SIZE
>> + *      Maximum Value:  BLKIF_MAX_SEGMENTS_PER_REQUEST * PAGE_SIZE
>> + *
>> + *      The maximum amount of data, in bytes, that can be referenced by a
>> + *      request type that accesses frontend memory (currently BLKIF_OP_READ,
>> + *      BLKIF_OP_WRITE, or BLKIF_OP_WRITE_BARRIER).
> 
> So just to make sure my math is correct. That would be 1MB right?

Assuming a 4K PAGE_SIZE, the maximum I/O possible is 1020KiB or .996MiB.
Allowing more segments would require expanding the 8bit nr_segments field,
severely complicating backwards compatibility.

> 
>> + *
>>  *------------------------- Backend Device Properties 
>> -------------------------
>>  *
>>  * discard-aligment
>> @@ -242,6 +268,33 @@
>>  *      The size of the frontend allocated request ring buffer in units of
>>  *      machine pages.  The value must be a power of 2.
>>  *
>> + * max-requests
>> + *      Values:         <uint32_t>
>> + *      Default Value:  BLKIF_MAX_RING_REQUESTS(PAGE_SIZE)
>> + *      Maximum Value:  BLKIF_MAX_RING_REQUESTS(PAGE_SIZE * max-ring-pages)
>> + *
>> + *      The maximum number of concurrent, logical requests that will be
>> + *      issued by the frontend.
>> + *
>> + *      Note: A logical request may span multiple ring entries.
>> + *
>> + * max-request-segments
>> + *      Values:         <uint8_t>
>> + *      Default Value:  BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK
>> + *      Maximum Value:  MIN(255, backend/max-request-segments)
> 
> Um, that looks like its referencing itself? This is the backend section.

This is at the end of the frontend section, but the diff doesn't have
enough context to make that obvious.

--
Justin
_______________________________________________
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®.