From: Peter Zijlstra <peterz@infradead.org>
To: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org, h.mitake@gmail.com,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH] Add "nested" field to event of lock_release
Date: Sat, 10 Apr 2010 19:45:17 +0200 [thread overview]
Message-ID: <1270921517.20295.3372.camel@laptop> (raw)
In-Reply-To: <4BC09032.1060004@dcl.info.waseda.ac.jp>
On Sat, 2010-04-10 at 23:50 +0900, Hitoshi Mitake wrote:
> On 04/10/10 22:59, Peter Zijlstra wrote:
> > On Sat, 2010-04-10 at 19:41 +0900, Hitoshi Mitake wrote:
> >> State machine of perf lock requires "nested" field of lock_release(),
> >> so this patch adds it to event.
> >>
> >> Signed-off-by: Hitoshi Mitake<mitake@dcl.info.waseda.ac.jp>
> >> Cc: Peter Zijlstra<a.p.zijlstra@chello.nl>
> >> Cc: Paul Mackerras<paulus@samba.org>
> >> Cc: Arnaldo Carvalho de Melo<acme@redhat.com>
> >> Cc: Frederic Weisbecker<fweisbec@gmail.com>
> >
> > The nested flag only indicates if it could be nested, not if it was
> > actually nested. So no, this doesn't make any sense at all.
> >
> > (in fact, pretty much every lock_release out there has nested=1)
> >
Just to clarify, nested=0 means the released lock needs to be at the top
of the lock stack. This means all locking needs to be perfectly
balanced:
lock A
lock B
unlock A
unlock B
Would be an invalid sequence in that scenario. I think when lockdep was
started it was thought it would be nice to be able to clean up locking
to be always perfectly balanced, but it was found quite early to be too
much, so it got relaxed to always nested=1, allowing the above sequence.
prev parent reply other threads:[~2010-04-10 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 10:41 [PATCH] Add "nested" field to event of lock_release Hitoshi Mitake
2010-04-10 13:59 ` Peter Zijlstra
2010-04-10 14:50 ` Hitoshi Mitake
2010-04-10 17:45 ` Peter Zijlstra [this message]
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=1270921517.20295.3372.camel@laptop \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=h.mitake@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mitake@dcl.info.waseda.ac.jp \
--cc=paulus@samba.org \
/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 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.