From: Tim Deegan Subject: Re: [PATCH v3] Xen: Spread boot time page scrubbing across all available CPU's Date: Mon, 14 Apr 2014 00:45:44 +0200 Message-ID: <20140413224544.GI99209@deinos.phlegethon.org> References: <201404121041.s3CAfTZ6011072@userz7022.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <201404121041.s3CAfTZ6011072@userz7022.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: keir@xen.org, Andrew Cooper , dario.faggioli@citrix.com, xen-devel@lists.xen.org, Konrad Rzeszutek Wilk , JBeulich@suse.com, malcolm.crossley@citrix.com List-Id: xen-devel@lists.xenproject.org At 06:41 -0400 on 12 Apr (1397281284), Konrad Rzeszutek Wilk wrote: > On Apr 11, 2014 2:38 PM, Andrew Cooper wrote: > > On 11/04/14 19:08, Konrad Rzeszutek Wilk wrote: = > > > +=A0=A0=A0 if ( data ) = > > > +=A0=A0=A0=A0=A0=A0=A0 r =3D data; = > > > +=A0=A0=A0 else { = > > > +=A0=A0=A0=A0=A0=A0=A0 node =3D cpu_to_node(cpu); = > > > +=A0=A0=A0=A0=A0=A0=A0 if ( node =3D=3D NUMA_NO_NODE ) = > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return; = > > > +=A0=A0=A0=A0=A0=A0=A0 r =3D ®ion[node]; = > > > +=A0=A0=A0 } = > > > +=A0=A0=A0 ASSERT(r !=3D NULL); = > > > > Under what conditions would NULL be passed?=A0 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. > > > +=A0=A0=A0 wmb(); = > > > > Why this barrier? > = > Tim asked for it in his review - see http://lists.xen.org/archives/html/x= en-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 =3D 1 this fix is not needed anymore. Will remove it. Yep, on_selected_cpus will DTRT here. Cheers, Tim.