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-ia64-devel

Re: [Xen-ia64-devel] [PATCH] add volatile to pte entry of the p2m table

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] add volatile to pte entry of the p2m table
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 13 Jun 2006 14:24:13 -0600
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 13 Jun 2006 13:25:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060610025007.GB25639%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
References: <20060609091606.GH14764%yamahata@xxxxxxxxxxxxx> <1149872812.5523.22.camel@lappy> <20060610025007.GB25639%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2006-06-10 at 11:50 +0900, Isaku Yamahata wrote:
> Hi Alex.
> 
> On Fri, Jun 09, 2006 at 11:06:52AM -0600, Alex Williamson wrote:
> > On Fri, 2006-06-09 at 18:16 +0900, Isaku Yamahata wrote:
> > > add volatile to pte entry of the p2m table.
> > > p2m table are shared by cpu. added volatile as compiler barrier.
> > 
> >    Are all of these really needed?  Seems a little overkill to me.
> 
> Actually no.
> assign_new_domain_page() and its families and domain_page_mapped()
> are used only when domain construction (for now).
> So their pte accesses aren't racy.
> 
> However, to remove volatile of them, non-volatile version
> of lookup_alloc_domain_pte() is needed.
> Because domain creation isn't performance critical,
> I did't think it was worthwhile to both volatile version
> and non-volatile version of lookup_alloc_domain_pte().

Hi Isaku,

   I guess the problem is that I don't quite see how adding these
volatile declarations actually fix anything.  If we're dealing with
races because of concurrent accesses to the data, I would expect we need
to add some locking.  I'd be surprised if declaring a variable as
volatile would solve the race.  Thanks,

        Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


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