From: "Jan Beulich" Subject: RE: cpuidle causing Dom0 soft lockups Date: Tue, 23 Feb 2010 10:37:55 +0000 Message-ID: <4B83BE1302000078000309B2@vpn.id2.novell.com> References: <4B8294C5020000780003076D@vpn.id2.novell.com> <8B81FACE836F9248894A7844CC0BA8142E59595D03@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: <8B81FACE836F9248894A7844CC0BA8142E59595D03@shzsmsx501.ccr.corp.intel.com> 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 >>> "Yu, Ke" 23.02.10 10:32 >>> >>The author's assertion was that vc must be runnable and hence cannot be >>polling and hence cannot be is_urgent. It sounded dodgy to me hence I >>upgarded it to a BUG_ON(), but couldn't actually eyeball a way in which >>vc->is_urgent could be true at that point in the code. We have the lock = on >>the peer cpu's schedule_lock, so is_urgent cannot change under our feet, = and >>vc is not running so it cannot be added to the domain's poll_mask under = our >>feet. >Right. According to the code, there should be no way to this BUG_ON. >If it happens, that reveal either bugs of code or the necessity of >adding code to migrate urgent vcpu count. Do you have more >information on how this BUG_ON happens? Obviously there are vCPU-s that get inserted on a run queue with is_urgent set (which according to my reading of Keir's description shouldn't happen). In particular, this --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -201,6 +201,7 @@ __runq_insert(unsigned int cpu, struct c =20 BUG_ON( __vcpu_on_runq(svc) ); BUG_ON( cpu !=3D svc->vcpu->processor ); +WARN_ON(svc->vcpu->is_urgent);//temp =20 list_for_each( iter, runq ) { triggers occasionally: (XEN) Xen call trace: (XEN) [] csched_vcpu_wake+0x1e8/0x200 (XEN) [] vcpu_wake+0x152/0x3a0 (XEN) [] vcpu_kick+0x1d/0x80 (XEN) [] evtchn_set_pending+0x145/0x1d0 (XEN) [] evtchn_send+0xa8/0x150 (XEN) [] do_event_channel_op+0x552/0x10d0 (XEN) [] do_iret+0xc1/0x1a0 (XEN) [] syscall_enter+0xa9/0xae As I understand it, a vCPU with is_urgent set being on any run queue is enough for the questionable BUG_ON() to eventually trigger. Jan