All of lore.kernel.org
 help / color / mirror / Atom feed
* dump runq with debug key 'r' may cause dead loop
@ 2011-03-04  9:40 Wei, Gang
  2011-03-04 10:05 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Wei, Gang @ 2011-03-04  9:40 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Wei, Gang

Recently I found dump runq with debug key 'r' may cause dead loop like below:

(XEN) active vcpus:
(XEN) 	  1: [1.0] pri=0 flags=0 cpu=0 credit=263 [w=256]
(XEN) 	  2: [0.2] pri=0 flags=0 cpu=5 credit=284 [w=256]
(XEN) 	  3: [0.2] pri=0 flags=0 cpu=5 credit=282 [w=256]
...
(XEN)  xxxxx: [0.2] pri=0 flags=0 cpu=2 credit=54 [w=256]
...
(XEN)  xxxxx: [0.2] pri=0 flags=0 cpu=3 credit=-48 [w=256]
...

This means the active vcpu 0.2 became non-active just after it was access in the loop '2:', and that list element became empty state (head->next==next).

Should we always hold a lock before access any schedule related list, even in the debug purpose dump code? If it is not acceptable, then we'd better add a list_empty() check in the dump functions which access schedule related list at least to avoid such a dead loop.

Jimmy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-04 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04  9:40 dump runq with debug key 'r' may cause dead loop Wei, Gang
2011-03-04 10:05 ` Keir Fraser
2011-03-04 14:51   ` [PATCH]sched_credit: Hold lock while dump scheduler info (RE: dump runq with debug key 'r' may cause dead loop) Wei, Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.