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

[Xen-devel] disk io request structures


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Paresh Nakhe <paresh.nakhe@xxxxxxxxx>
  • Date: Wed, 2 Feb 2011 22:17:57 +0530
  • Delivery-date: Wed, 02 Feb 2011 13:08:45 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=DBIuBoMj/9ui4qhNKcZBHBTJKKvdgRKKvyD8nnIHvat3yeVdBmoVdb14j6D+Ovmnn8 o1fT9E0fPkrdQSZDNYntRyxd9KKRGtFJdTQIjMLK9DYWIpUsTB0nIyqueeyAwiU2EwNh PhETsN22ObfEAvXigkjTS+0RjxsBNQz85wMpY=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi,
Following is the structure of an IO request which is inserted in the shared IO ring.

include/xen/interface/io/blkif.h

struct blkif_request {
    uint8_t        operation;    /* BLKIF_OP_???                         */
    uint8_t        nr_segments;  /* number of segments                   */
    blkif_vdev_t   handle;       /* only for read/write requests         */
    uint64_t       id;           /* private guest value, echoed in resp  */
    blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
    struct blkif_request_segment {
        grant_ref_t gref;        /* reference to I/O buffer frame        */
        /* @first_sect: first sector in frame to transfer (inclusive).   */
        /* @last_sect: last sector in frame to transfer (inclusive).     */
        uint8_t     first_sect, last_sect;
    } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST];
};

Sorry, if my questions seem obvious or trivial. I am a newbie in xen development. Right now, me and my group are trying to understand the disk io mechanism in XEN. We intend to modify the existing system. We expect better performance after this modification.

So, in the above structure,
 1. what is a "segment" referred in the structure.
 2. Why is there an array of blkif_request_segment (why not a single instance). What is it's purpose?
 3. In the structure blkif_request_segment, are the first_sect and last_sect physical sector numbers

Thanks.
Paresh Nakhe


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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