From: Tim Deegan Subject: Re: [PATCH] Avoid endless loop for vcpu migration Date: Mon, 14 Mar 2011 15:06:36 +0000 Message-ID: <20110314150636.GG24523@whitby.uk.xensource.com> References: <9d164ce877a75cab847b.1300113594@nehalem1> <4D7E3C640200007800036564@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <4D7E3C640200007800036564@vpn.id2.novell.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: Jan Beulich Cc: Juergen Gross , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 15:03 +0000 on 14 Mar (1300115028), Jan Beulich wrote: > >>> On 14.03.11 at 15:39, Juergen Gross wrote: > > On multi-thread multi-core systems an endless loop can occur in vcpu_migrate() > > with credit scheduler. Avoid this loop by changing the interface of pick_cpu > > to indicate a repeated call in this case. > > But you're not changing in any way the loop that doesn't get > exited - did you perhaps read my original description as the > pick function itself looping (which - afaict - it doesn't)? > > Further, the change still isn't consistent with idle_bias - the > updating ought to happen on the last iteration (if you need > to call the function more than once), not the first one, which > creates a chicken-and-egg problem for you as you will know > it's the last one only when it returned. Perhaps you could submit a comment patch that describes exactly what idle_bias is and how it's supposed to work. At the moment it's entirely uncommented. Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)