WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] ring.h notification hold-off question

To: Daniel Stodden <stodden@xxxxxxxxxx>, Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] ring.h notification hold-off question
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 10 Nov 2007 09:40:19 +0000
Delivery-date: Sat, 10 Nov 2007 01:35:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1194673068.5996.51.camel@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgjfbS58znVko9wEdyTmQAWy6hiGQ==
Thread-topic: [Xen-devel] ring.h notification hold-off question
User-agent: Microsoft-Entourage/11.3.6.070618
On 10/11/07 05:37, "Daniel Stodden" <stodden@xxxxxxxxxx> wrote:

> b) if __old were UINT_MAX, then the consumer side might/would
>    set req_event to 0 after catching up right? (req_cons(== req_prod)+1)
>    now assume __new  ==  __old + 2 then we had
> 
> req_event [0] < __new [1] < __old [INT_MAX]
> 
>    i.e.
> __new - req_event [1] > __new - __old [-1]
> 
>    i.e. _notify=false, which i believe skips a wanted notification.

No. req_event==0, new==1, old==UINT_MAX. Then new-req_event==1, new-old==2.
Hence a notification will be sent.

Case (c) you are also wrong because after the subtractions we cast to an
unsigned integer. Hence in the case old<new<req_event, new-req_event will be
a large +ve integer, not a small -ve one.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>