From: Tim Deegan Subject: Re: [xen-unstable test] 6374: regressions - FAIL Date: Mon, 14 Mar 2011 10:52:28 +0000 Message-ID: <20110314105228.GF24523@whitby.uk.xensource.com> References: <19834.24888.630582.491364@mariner.uk.xensource.com> <20110314100223.GE24523@whitby.uk.xensource.com> <4D7DFE76020000780003634E@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <4D7DFE76020000780003634E@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: George Dunlap , "George@citrix.com" , "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org At 10:39 +0000 on 14 Mar (1300099174), Jan Beulich wrote: > > I think this hang comes because although this code: > > > > cpu = cycle_cpu(CSCHED_PCPU(nxt)->idle_bias, nxt_idlers); > > if ( commit ) > > CSCHED_PCPU(nxt)->idle_bias = cpu; > > cpus_andnot(cpus, cpus, per_cpu(cpu_sibling_map, cpu)); > > > > removes the new cpu and its siblings from cpus, cpu isn't guaranteed to > > have been in cpus in the first place, and none of its siblings are > > either since nxt might not be its sibling. > > I had originally spent quite a while to verify that the loop this is in > can't be infinite (i.e. there's going to be always at least one bit > removed from "cpus"), and did so again during the last half hour > or so. I'm pretty sure there are possible passes through this loop that don't remove any cpus, though I haven't constructed the full history that gets you there. But the cpupool patches you suggest in your other email look like much stronger candidates for this hang. > > which guarantees that nxt will be removed from cpus, though I suspect > > this means that we might not pick the best HT pair in a particular core. > > Scheduler code is twisty and hurts my brain so I'd like George's > > opinion before checking anything in. > > No - that was precisely done the opposite direction to get > better symmetry of load across all CPUs. With what you propose, > idle_bias would become meaningless. I don't think see why it would. As I said, having picked a core we might not iterate to pick the best cpu within that core, but the round-robining effect is still there. And even if not I figured a hypervisor crash is worse than a suboptimal scheduling decision. :) Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)