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().
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 Williamson HP Open Source & Linux Org.
Xen-ia64-devel mailing list