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

Re: [Xen-devel] [Problem] about src/xen/include/public/io/ring.h

On Fri, 2013-04-12 at 11:35 +0100, éç wrote:

> It's difficult for me to image the ring buffer scene where the ring
> becomes full of either
> responses or requests , because the
> src/docs/misc/blkif-drivers-explained.txt mentioned

I can't find a copy of this document.

> that
> a ring is partitioned into a request and a response region by four
> pointers and pointers may only 
> advance, and may not pass one another.

Correct, although the ring is only partitioned by the pointers and their
current values, it is not statically partitioned into those two halves
or anything like that.

This stuff is quite difficult to describe in words. Perhaps you would
find it helpful to draw the ring and the 4 pointers and to consider what
happens when each pointer catches up to (but doesn't pass) the one in
front, and what this tells you about the number of requests/responses
which are on the ring at that time.

Then remember that the ring is actually represented as a single page of
memory, with the pointers logically wrapping from +4096 (==PAGE_SIZE)
back to +0.


Xen-devel mailing list



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