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

Re: [Xen-devel] [PATCH v3] Xen: Spread boot time page scrubbing across all available CPU's



At 06:41 -0400 on 12 Apr (1397281284), Konrad Rzeszutek Wilk wrote:
> On Apr 11, 2014 2:38 PM, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> > On 11/04/14 19:08, Konrad Rzeszutek Wilk wrote: 
> > > +    if ( data ) 
> > > +        r = data; 
> > > +    else { 
> > > +        node = cpu_to_node(cpu); 
> > > +        if ( node == NUMA_NO_NODE ) 
> > > +            return; 
> > > +        r = &region[node]; 
> > > +    } 
> > > +    ASSERT(r != NULL); 
> >
> > Under what conditions would NULL be passed?  Can't the caller do 
> > something more sane? 

In round 1, the caller (via on_selected_cpus()) passes NULL to tell
the workers to scrub their local NUMA nodes.  In round 2, it passes
explicit node details to all workers.  Seems OK to me.

> > > +    wmb(); 
> >
> > Why this barrier?
> 
> Tim asked for it in his review - see 
> http://lists.xen.org/archives/html/xen-devel/2013-10/msg00131.html
> " + scrub_one_page(pg); > + } There should be a wmb() here, to make sure the 
> main scrub dispatcher can't exit while the last worker is still issuing 
> writes."
> 
> But with the @wait = 1 this fix is not needed anymore. Will remove it.

Yep, on_selected_cpus will DTRT here.

Cheers,

Tim.

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