From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH] Avoid endless loop for vcpu migration Date: Tue, 15 Mar 2011 09:53:02 +0100 Message-ID: <4D7F28EE.20005@ts.fujitsu.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org On 03/15/11 09:50, Keir Fraser wrote: > On 15/03/2011 08:46, "Juergen Gross" wrote: > >>> It's not critical, and not affecting correctness. But with updating >>> idle_bias on the first invocation you're (on the right hardware) >>> basically guaranteeing the second invocation to return a >>> different CPU. That way, your loop will be run minimally three >>> times on such systems. I already find it odd to require two >>> iterations when previously this was a strait code path. >> >> This was wrong. It was always required to hold the schedule lock of the >> picked cpu as well, otherwise a race with cpu hotplug would be possible. > > What would that race be? CPU offlining is done in stop_machine context. Ahh, okay. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html