From: "Jan Beulich" Subject: Re: cpuidle causing Dom0 soft lockups Date: Tue, 16 Feb 2010 07:59:59 +0000 Message-ID: <4B7A5E8F020000780002F929@vpn.id2.novell.com> References: <8B81FACE836F9248894A7844CC0BA8142B04198EDC@shzsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline 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 , Ke Yu Cc: Kevin Tian , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 15.02.10 18:33 >>> >Attached is a better version of your patch (I think). I haven't applied = it >because I don't see why the ASSERT() in sched_credit.c is correct. How do >you know for sure that !v->is_urgent there (and therefore avoid urgent_cou= nt >manipulation)? Two remarks: For one, your patch doesn't consider vCPU-s with event delivery disabled urgent anymore. Second, here >+ /* >+ * Transfer urgency status to new CPU before switching CPUs, as once >+ * the switch occurs, v->is_urgent is no longer protected by the = per-CPU >+ * scheduler lock we are holding. >+ */ >+ if ( unlikely(v->is_urgent) ) >+ { >+ atomic_dec(&per_cpu(schedule_data, old_cpu).urgent_count); >+ atomic_inc(&per_cpu(schedule_data, new_cpu).urgent_count); >+ } I would think we should either avoid the atomic ops altogether if old_cpu =3D=3D new_cpu, or switch the updating order (inc before dec). As to your other question - yes, I'd certainly like to see this included = in -rc3. Jan