From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushik Bhandankar Subject: doubt: Block IO multiple ring protocol Date: Thu, 15 Nov 2007 02:54:11 -0500 Message-ID: <473BFB23.9050001@cc.gatech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen-devel List-Id: xen-devel@lists.xenproject.org Hello, Looking at linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c, I had following doubts (also looked at the following changeset which introduces multiple ring protocols: http://lists.xensource.com/archives/html/xen-changelog/2007-01/msg00413.html) 1) When a block IO request is made by guest, do_block_io_op() obtains the 'req' from appropriate ring based on blk_protocol (and invokes dispatch_rw_block_io()) but the "req_cons" is incremented for the "common" ring.. Where is the "req_cons" being incremented for the corresponding ring (native, x86_32 or x86_64) ? 2) For sending back the response, make_response() copies the "resp" on the appropriate ring based on blk_protocol but increments the "rsp_prod_pvt" for the "common" ring. Where is the "rsp_prod_pvt" being incremented for the corresponding ring (native, x86_32 or x86_64) ? Looking at xen/include/public/io/ring.h, I couldnt really figure things out looking at the macros? Am not really sure how the counters get incremented/decremented for each protocol ring during block request/response phase ...Any hint is appreciated.... --Kaushik