From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: keir@xen.org, xen-devel@lists.xen.org
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>,
Konrad Wilk <konrad.wilk@oracle.com>
Subject: preemption and locking: why joined at the hip?
Date: Fri, 31 Aug 2012 12:47:21 -0700 (PDT) [thread overview]
Message-ID: <16d6e254-acff-4212-b5ed-0b3dd5b40ea5@default> (raw)
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
next reply other threads:[~2012-08-31 19:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 19:47 Dan Magenheimer [this message]
2012-08-31 20:08 ` preemption and locking: why joined at the hip? Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16d6e254-acff-4212-b5ed-0b3dd5b40ea5@default \
--to=dan.magenheimer@oracle.com \
--cc=keir@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xen.org \
--cc=zhenzhong.duan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).