xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* preemption and locking: why joined at the hip?
@ 2012-08-31 19:47 Dan Magenheimer
  2012-08-31 20:08 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Magenheimer @ 2012-08-31 19:47 UTC (permalink / raw)
  To: keir, xen-devel; +Cc: Zhenzhong Duan, Konrad Wilk

Tracking down a tmem problem in 4.2.0-rcN that crashes the
hypervisor, I've discovered a 4.2 changeset that forces
a preemption_enable/disable for every lock/unlock.

Tmem has dynamically allocated "objects" that contain a
lock.  The lock is held when the object is destroyed.
No reason to unlock something that's about to be destroyed.
But with the preempt_enable/disable in the generic locking code,
and the fact that do_softirq ASSERTs that preempt_count
must be zero, a crash occurs.

While I'm suitably embarrassed that tmem has not yet
been tested with any recent -unstable, and I note that the
workaround is simple (forcing an unlock before destroying the
object containing the held lock), I have to ask if
this change is really a good idea or is it unnecessary
babysitting?

Dan

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

end of thread, other threads:[~2012-08-31 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 19:47 preemption and locking: why joined at the hip? Dan Magenheimer
2012-08-31 20:08 ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).