From: Keir Fraser Subject: Re: [PATCH] Avoid endless loop for vcpu migration Date: Tue, 15 Mar 2011 08:50:20 +0000 Message-ID: References: <4D7F2750.4010607@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D7F2750.4010607@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross , Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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. -- Keir