mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/3] posix-timers: remove idr_lock
Date: Fri, 10 Jun 2011 22:44:28 +0200	[thread overview]
Message-ID: <20110610204428.GB10930@one.firstfloor.org> (raw)
In-Reply-To: <1307738438.2872.7.camel@edumazet-laptop>

On Fri, Jun 10, 2011 at 10:40:38PM +0200, Eric Dumazet wrote:
> Le vendredi 10 juin 2011 à 13:13 -0700, Andi Kleen a écrit :
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > idr_lock is only used to protect the global posix_timers idr,
> > but idr does its own locking (or RCUing) anyways and doesn't
> > need it. So remove it.
> 
> Are you sure of this assertion Andi ?
> 
> I believe we need an external synchronization before calling
> idr_remove() / idr_get_new()

idr has its own lock and from a quick check it seemed to always
take it when needed. Also ipc/* don't take a lock for this as far
as I can see, and I think RCU idr was designed for that.

-Andi

  reply	other threads:[~2011-06-10 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 20:13 Andi Kleen
2011-06-10 20:13 ` [PATCH 2/3] posix-timers: move global timer id management to signal_struct Andi Kleen
2011-06-10 20:13 ` [PATCH 3/3] posix-timers: limit the number of posix timers per process Andi Kleen
2011-06-10 20:40 ` [PATCH 1/3] posix-timers: remove idr_lock Eric Dumazet
2011-06-10 20:44   ` Andi Kleen [this message]
2011-06-10 20:52     ` Eric Dumazet

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=20110610204428.GB10930@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®