From: Paul Mackerras <paulus@samba.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v4] perf_counter: Fix race in attaching counters to tasks and exiting
Date: Thu, 28 May 2009 22:16:05 +1000 [thread overview]
Message-ID: <18974.32901.99290.162863@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1243509170.6600.36.camel@laptop>
Peter Zijlstra writes:
> The poor task will now have to wait for yet another RCU grace period,
> but yeah :-)
I moved the put_task_struct into put_ctx, inside the if, so the poor
task won't get impatient. :)
> Looks good, although lockdep will complain, the proper annotation would
> be spin_lock_nested_lock(&ctx->lock, &rq->lock), but since we don't have
> access to the rq here, we should change the second spin_lock, to:
>
> spin_lock_nested(&next_ctx->lock, SINGLE_DEPTH_NESTING);
Ah OK, thanks.
> You jump into an rcu_read_lock() section there.
Oops. I'll fix that. I also need to use spin_[un]lock_irq in there.
New version coming. Thanks for the review.
Paul.
prev parent reply other threads:[~2009-05-28 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 10:32 Paul Mackerras
2009-05-28 11:12 ` Peter Zijlstra
2009-05-28 12:16 ` Paul Mackerras [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=18974.32901.99290.162863@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®