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

Re: [Xen-devel] RING_HAS_UNCONSUMED_REQUESTS oddness



On 06/03/14 15:53, Ian Campbell wrote:
On Thu, 2014-03-06 at 15:47 +0000, Zoltan Kiss wrote:
By my understanding, there is no way rsp could be smaller than req, so
there is no point having this. Am I missing something?

It happens during wraparound, i.e. after req has wrapped but rsp hasn't
yet.

The name of the macro suggest we are interested whether the ring has unconsumed requests, and netback uses it that way. The answer to that question is req_prod - req_cons. And it works if prod wrapped but cons didn't. rsp calculates the number of "consumed but not responded" requests (it also works well if req_cons wrapped but rsp_prod_pvt didn't), then subtract it from the ring size. So it gives the number of unconsumed responses + unconsumed requests + unused slots. Why do we care about it? And as it includes the number of unconsumed requests, it couldn't be smaller than that, could it?

Zoli


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