* [Problem] about src/xen/include/public/io/ring.h
@ 2013-04-08 8:10 马磊
2013-04-08 13:32 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-08 8:10 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 376 bytes --]
Hi,
there is a macro in io/ring.h as follows:
211#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({
\ |
212 unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;
\
213 unsigned int rsp = RING_SIZE(_r) -
\
214 ((_r)->req_cons - (_r)->rsp_prod_pvt);
\
215 req < rsp ? req : rsp;
\
216})
Anyone could explain this?
[-- Attachment #1.2: Type: text/html, Size: 864 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-08 8:10 [Problem] about src/xen/include/public/io/ring.h 马磊
@ 2013-04-08 13:32 ` Konrad Rzeszutek Wilk
2013-04-09 3:05 ` 马磊
2013-04-10 6:20 ` 马磊
0 siblings, 2 replies; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-08 13:32 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com
On Mon, Apr 08, 2013 at 04:10:49PM +0800, 马磊 wrote:
> Hi,
> there is a macro in io/ring.h as follows:
>
> 211#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({
> \ |
> 212 unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;
> \
> 213 unsigned int rsp = RING_SIZE(_r) -
> \
> 214 ((_r)->req_cons - (_r)->rsp_prod_pvt);
> \
> 215 req < rsp ? req : rsp;
> \
> 216})
>
> Anyone could explain this?
Which part are you unclear about?
I might be easier if you deconstruct the macro and write out
inthe code. That should give you an idea of what it does.
<hint: Figure out first what RING_SIZE comes out to>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-08 13:32 ` Konrad Rzeszutek Wilk
@ 2013-04-09 3:05 ` 马磊
2013-04-10 13:15 ` Konrad Rzeszutek Wilk
2013-04-10 6:20 ` 马磊
1 sibling, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-09 3:05 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --]
On Mon, Apr 8, 2013 at 9:32 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Mon, Apr 08, 2013 at 04:10:49PM +0800, 马磊 wrote:
> > Hi,
> > there is a macro in io/ring.h as follows:
> >
> > 211#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({
> > \ |
> > 212 unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;
> > \
> > 213 unsigned int rsp = RING_SIZE(_r) -
> > \
> > 214 ((_r)->req_cons - (_r)->rsp_prod_pvt);
> > \
> > 215 req < rsp ? req : rsp;
> > \
> > 216})
> >
> > Anyone could explain this?
>
> Which part are you unclear about?
>
> I might be easier if you deconstruct the macro and write out
> inthe code. That should give you an idea of what it does.
> <hint: Figure out first what RING_SIZE comes out to>
>
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
>
Why does the macro for response is :
207#define RING_HAS_UNCONSUMED_RESPONSES(_r) \
208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
why not the macro for request written like this:
#define RING_HAS_UNCONSUMED_REQUESTS(_r) \
((_r)->sring->req_prod - (_r)->req_cons)
The RING_SIZE means the maximum number for the shared ring to accommodate
the req/resp message struct, is that?
[-- Attachment #1.2: Type: text/html, Size: 2606 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-08 13:32 ` Konrad Rzeszutek Wilk
2013-04-09 3:05 ` 马磊
@ 2013-04-10 6:20 ` 马磊
2013-04-10 13:15 ` Konrad Rzeszutek Wilk
1 sibling, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-10 6:20 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 76 bytes --]
reference:xen-src/docs/misc/blkif-drivers-explained.txt : 229-245 lines
[-- Attachment #1.2: Type: text/html, Size: 102 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-09 3:05 ` 马磊
@ 2013-04-10 13:15 ` Konrad Rzeszutek Wilk
2013-04-11 7:46 ` 马磊
0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-10 13:15 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com
On Tue, Apr 09, 2013 at 11:05:52AM +0800, 马磊 wrote:
> On Mon, Apr 8, 2013 at 9:32 PM, Konrad Rzeszutek Wilk <
> konrad.wilk@oracle.com> wrote:
>
> > On Mon, Apr 08, 2013 at 04:10:49PM +0800, 马磊 wrote:
> > > Hi,
> > > there is a macro in io/ring.h as follows:
> > >
> > > 211#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({
> > > \ |
> > > 212 unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;
> > > \
> > > 213 unsigned int rsp = RING_SIZE(_r) -
> > > \
> > > 214 ((_r)->req_cons - (_r)->rsp_prod_pvt);
> > > \
> > > 215 req < rsp ? req : rsp;
> > > \
> > > 216})
> > >
> > > Anyone could explain this?
> >
> > Which part are you unclear about?
> >
> > I might be easier if you deconstruct the macro and write out
> > inthe code. That should give you an idea of what it does.
> > <hint: Figure out first what RING_SIZE comes out to>
> >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.xen.org
> > > http://lists.xen.org/xen-devel
> >
> >
> Why does the macro for response is :
> 207#define RING_HAS_UNCONSUMED_RESPONSES(_r) \
> 208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
>
> why not the macro for request written like this:
> #define RING_HAS_UNCONSUMED_REQUESTS(_r) \
> ((_r)->sring->req_prod - (_r)->req_cons)
>
>
> The RING_SIZE means the maximum number for the shared ring to accommodate
> the req/resp message struct, is that?
Correct. The req message is about 112 bytes, and at the start of the ring
you have 64-bytes for rsp, req, etc. So the end result is 32 ring entries.
The response structures are much smaller, but since you are sharing the ring
(so you put both requests and responses on it), it is still limited to 32
entries.
I am not really sure what you mean by 'why not the macro'.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-10 6:20 ` 马磊
@ 2013-04-10 13:15 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-10 13:15 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com
On Wed, Apr 10, 2013 at 02:20:12PM +0800, 马磊 wrote:
> reference:xen-src/docs/misc/blkif-drivers-explained.txt : 229-245 lines
Does that mean it answers your question?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-10 13:15 ` Konrad Rzeszutek Wilk
@ 2013-04-11 7:46 ` 马磊
2013-04-11 13:20 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-11 7:46 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 2490 bytes --]
I means, in ring.h,
The macro for unconsumed response is :
207#define RING_HAS_UNCONSUMED_RESPONSES(_r)
\
208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
*Should the macro for unconsumed request be written like this:*
#define RING_HAS_UNCONSUMED_REQUESTS(_r) \
((_r)->sring->req_prod - (_r)->req_cons)
On Wed, Apr 10, 2013 at 9:15 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Tue, Apr 09, 2013 at 11:05:52AM +0800, 马磊 wrote:
> > On Mon, Apr 8, 2013 at 9:32 PM, Konrad Rzeszutek Wilk <
> > konrad.wilk@oracle.com> wrote:
> >
> > > On Mon, Apr 08, 2013 at 04:10:49PM +0800, 马磊 wrote:
> > > > Hi,
> > > > there is a macro in io/ring.h as follows:
> > > >
> > > > 211#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({
> > > > \ |
> > > > 212 unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;
> > > > \
> > > > 213 unsigned int rsp = RING_SIZE(_r) -
> > > > \
> > > > 214 ((_r)->req_cons - (_r)->rsp_prod_pvt);
> > > > \
> > > > 215 req < rsp ? req : rsp;
> > > > \
> > > > 216})
> > > >
> > > > Anyone could explain this?
> > >
> > > Which part are you unclear about?
> > >
> > > I might be easier if you deconstruct the macro and write out
> > > inthe code. That should give you an idea of what it does.
> > > <hint: Figure out first what RING_SIZE comes out to>
> > >
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.xen.org
> > > > http://lists.xen.org/xen-devel
> > >
> > >
> > Why does the macro for response is :
> > 207#define RING_HAS_UNCONSUMED_RESPONSES(_r)
> \
> > 208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
> >
> > why not the macro for request written like this:
> > #define RING_HAS_UNCONSUMED_REQUESTS(_r) \
> > ((_r)->sring->req_prod - (_r)->req_cons)
> >
> >
> > The RING_SIZE means the maximum number for the shared ring to accommodate
> > the req/resp message struct, is that?
>
> Correct. The req message is about 112 bytes, and at the start of the ring
> you have 64-bytes for rsp, req, etc. So the end result is 32 ring entries.
>
> The response structures are much smaller, but since you are sharing the
> ring
> (so you put both requests and responses on it), it is still limited to 32
> entries.
>
> I am not really sure what you mean by 'why not the macro'.
>
[-- Attachment #1.2: Type: text/html, Size: 5248 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-11 7:46 ` 马磊
@ 2013-04-11 13:20 ` Konrad Rzeszutek Wilk
2013-04-12 2:21 ` 马磊
0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-11 13:20 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com
On Thu, Apr 11, 2013 at 03:46:25PM +0800, 马磊 wrote:
> I means, in ring.h,
> The macro for unconsumed response is :
> 207#define RING_HAS_UNCONSUMED_RESPONSES(_r)
> \
> 208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
>
> *Should the macro for unconsumed request be written like this:*
> #define RING_HAS_UNCONSUMED_REQUESTS(_r) \
> ((_r)->sring->req_prod - (_r)->req_cons)
>
Please don't top post.
It is close to that in the code:
#define RING_HAS_UNCONSUMED_REQUESTS(_r) \
({ \
unsigned int req = (_r)->sring->req_prod - (_r)->req_cons; \
unsigned int rsp = RING_SIZE(_r) - \
((_r)->req_cons - (_r)->rsp_prod_pvt); \
req < rsp ? req : rsp; \
})
Can you figure out why it has the check against resp_cons and rsp_prod_pvt ?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-11 13:20 ` Konrad Rzeszutek Wilk
@ 2013-04-12 2:21 ` 马磊
2013-04-12 7:49 ` Ian Campbell
0 siblings, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-12 2:21 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 1444 bytes --]
On Thu, Apr 11, 2013 at 9:20 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Thu, Apr 11, 2013 at 03:46:25PM +0800, 马磊 wrote:
> > I means, in ring.h,
> > The macro for unconsumed response is :
> > 207#define RING_HAS_UNCONSUMED_RESPONSES(_r)
> > \
> > 208 ((_r)->sring->rsp_prod - (_r)->rsp_cons)
> >
> > *Should the macro for unconsumed request be written like this:*
> > #define RING_HAS_UNCONSUMED_REQUESTS(_r) \
> > ((_r)->sring->req_prod - (_r)->req_cons)
> >
>
> Please don't top post.
>
> It is close to that in the code:
>
> #define RING_HAS_UNCONSUMED_REQUESTS(_r) \
> ({ \
> unsigned int req = (_r)->sring->req_prod - (_r)->req_cons; \
> unsigned int rsp = RING_SIZE(_r) - \
> ((_r)->req_cons - (_r)->rsp_prod_pvt); \
> req < rsp ? req : rsp; \
> })
>
> Can you figure out why it has the check against resp_cons and rsp_prod_pvt
> ?
>
Assume* X = (_r)->req_cons - (_r)->rsp_prod_pvt* and *Y = number of free
ring buffers for responder(backend driver)*, they are equal in amount, is
that?
Then rsp = RING_SIZE(r) - (X - Y), I can't figure out this and the return
value ` req < rsp ? req : rsp` ?
[-- Attachment #1.2: Type: text/html, Size: 2619 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 2:21 ` 马磊
@ 2013-04-12 7:49 ` Ian Campbell
2013-04-12 10:35 ` 马磊
0 siblings, 1 reply; 15+ messages in thread
From: Ian Campbell @ 2013-04-12 7:49 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk
On Fri, 2013-04-12 at 03:21 +0100, 马磊 wrote:
> On Thu, Apr 11, 2013 at 9:20 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
> Please don't top post.
马磊, Can you also stop posting HTML mails, thanks.
> Then rsp = RING_SIZE(r) - (X - Y), I can't figure out this and the
> return value ` req < rsp ? req : rsp` ?
Perhaps think about the case when the ring becomes full of either
responses or requests and what that means in terms of "wrapping" in the
ring.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 7:49 ` Ian Campbell
@ 2013-04-12 10:35 ` 马磊
2013-04-12 11:14 ` Ian Campbell
0 siblings, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-12 10:35 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk
[-- Attachment #1.1: Type: text/plain, Size: 1162 bytes --]
On Fri, Apr 12, 2013 at 3:49 PM, Ian Campbell <Ian.Campbell@citrix.com>wrote:
> On Fri, 2013-04-12 at 03:21 +0100, 马磊 wrote:
>
>
> > On Thu, Apr 11, 2013 at 9:20 PM, Konrad Rzeszutek Wilk
> > <konrad.wilk@oracle.com> wrote:
>
> > Please don't top post.
>
> 马磊, Can you also stop posting HTML mails, thanks.
>
I use the gmail client, reply through clicking `reply to all` in the input
text frame at bottom of the html page, and then send it away.
Do you mean to not to copy too many long time ago message?
> > Then rsp = RING_SIZE(r) - (X - Y), I can't figure out this and the
> > return value ` req < rsp ? req : rsp` ?
>
> Perhaps think about the case when the ring becomes full of either
> responses or requests and what that means in terms of "wrapping" in the
> ring.
>
> Ian.
>
>
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 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.
[-- Attachment #1.2: Type: text/html, Size: 2129 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 10:35 ` 马磊
@ 2013-04-12 11:14 ` Ian Campbell
2013-04-12 11:24 ` 马磊
0 siblings, 1 reply; 15+ messages in thread
From: Ian Campbell @ 2013-04-12 11:14 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk
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.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 11:14 ` Ian Campbell
@ 2013-04-12 11:24 ` 马磊
2013-04-12 13:45 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 15+ messages in thread
From: 马磊 @ 2013-04-12 11:24 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk
[-- Attachment #1.1: Type: text/plain, Size: 664 bytes --]
>
> 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.
>
>
Could you show me a rough figure for describing unconsumed requests in a
specific scene.
> 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.
>
> Ian.
>
>
You mean the ring is a circle buffer except for the ring header.
[-- Attachment #1.2: Type: text/html, Size: 1177 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 11:24 ` 马磊
@ 2013-04-12 13:45 ` Konrad Rzeszutek Wilk
2013-04-15 2:52 ` 马磊
0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-04-12 13:45 UTC (permalink / raw)
To: 马磊; +Cc: xen-devel@lists.xensource.com, Ian Campbell
On Fri, Apr 12, 2013 at 07:24:52PM +0800, 马磊 wrote:
> >
> > 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.
> >
> >
> Could you show me a rough figure for describing unconsumed requests in a
> specific scene.
It would be easier if you just instrumented the code in question to see
how it works.
>
>
> > 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.
> >
> > Ian.
> >
> >
> You mean the ring is a circle buffer except for the ring header.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Problem] about src/xen/include/public/io/ring.h
2013-04-12 13:45 ` Konrad Rzeszutek Wilk
@ 2013-04-15 2:52 ` 马磊
0 siblings, 0 replies; 15+ messages in thread
From: 马磊 @ 2013-04-15 2:52 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com, Ian Campbell
[-- Attachment #1.1: Type: text/plain, Size: 844 bytes --]
On Fri, Apr 12, 2013 at 9:45 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Fri, Apr 12, 2013 at 07:24:52PM +0800, 马磊 wrote:
> > >
> > > 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.
> > >
> > >
> > Could you show me a rough figure for describing unconsumed requests in a
> > specific scene.
>
> It would be easier if you just instrumented the code in question to see
> how it works.
>
>
Could you show me a scene in which what value the four pointers are
respectively equal to?
That's intuitional.
[-- Attachment #1.2: Type: text/html, Size: 1348 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-04-15 2:52 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 8:10 [Problem] about src/xen/include/public/io/ring.h 马磊
2013-04-08 13:32 ` Konrad Rzeszutek Wilk
2013-04-09 3:05 ` 马磊
2013-04-10 13:15 ` Konrad Rzeszutek Wilk
2013-04-11 7:46 ` 马磊
2013-04-11 13:20 ` Konrad Rzeszutek Wilk
2013-04-12 2:21 ` 马磊
2013-04-12 7:49 ` Ian Campbell
2013-04-12 10:35 ` 马磊
2013-04-12 11:14 ` Ian Campbell
2013-04-12 11:24 ` 马磊
2013-04-12 13:45 ` Konrad Rzeszutek Wilk
2013-04-15 2:52 ` 马磊
2013-04-10 6:20 ` 马磊
2013-04-10 13:15 ` Konrad Rzeszutek Wilk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.