All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"linux-tip-commits@vger.kernel.org" 
	<linux-tip-commits@vger.kernel.org>,
	Davidlohr Bueso <dave@stgolabs.net>, Peter Anvin <hpa@zytor.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jason Low <jason.low2@hp.com>,
	Michel Lespinasse <walken@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Dave Jones <davej@codemonkey.org.uk>,
	Ming Lei <ming.lei@canonical.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Kirill Tkhai <tkhai@yandex.ru>
Subject: Re: [tip:locking/core] locking/rwsem: Fix lock optimistic spinning when owner is not running
Date: Tue, 10 Mar 2015 19:33:12 +0100	[thread overview]
Message-ID: <20150310183312.GA13665@redhat.com> (raw)
In-Reply-To: <CA+55aFwyfhSFk69nLAsqUy44vVAH+28g7U221L-JDdz1o9f2wA@mail.gmail.com>

On 03/10, Linus Torvalds wrote:
>
> So I'm not a huge fan of SLAB_DESTROY_BY_RCU in general, but for
> really core data structures like this, I think it's worth it.

I agree, but we have other users which can't be fixed if we just add
SLAB_DESTROY_BY_RCU to task_struct_cachep. So we need something else
anyway.

> The
> overhead of "call_rcu()" can be quite noticeable,

Yes, this was my concern too,

> and the other
> alternative solutions (like that suggested task_rcu_dereference()) are
> even *more* complex and subtle

Yes, but at least the ugliness is hidden inside task_rcu_dereference().
The usage is simple.

> and generally perform worse.

Well, task_rcu_dereference() should be cheap enough. probe_slab_address()
is a plain LOAD unless CONFIG_DEBUG_PAGEALLOC.

But!

> I'm not claiming it's perfect,

Same here, it is not that I think task_rcu_dereference() is very nice.


So I leave this to you and Peter ;)

Oleg.


  reply	other threads:[~2015-03-10 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-07  7:45 [PATCH] locking/rwsem: Fix lock optimistic spinning when owner is not running Jason Low
2015-03-07  9:21 ` Peter Zijlstra
2015-03-09 17:42   ` Jason Low
2015-03-07 16:43 ` [tip:locking/core] " tip-bot for Jason Low
2015-03-07 17:13   ` Oleg Nesterov
2015-03-10 10:59     ` Peter Zijlstra
2015-03-10 16:04     ` Linus Torvalds
2015-03-10 16:16       ` Peter Zijlstra
2015-03-10 17:28       ` Oleg Nesterov
2015-03-10 17:45         ` Linus Torvalds
2015-03-10 18:33           ` Oleg Nesterov [this message]
2015-03-07 18:17 ` [PATCH] " Sasha Levin
2015-03-09 17:37   ` Jason Low

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=20150310183312.GA13665@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=davej@codemonkey.org.uk \
    --cc=hpa@zytor.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=sasha.levin@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tkhai@yandex.ru \
    --cc=torvalds@linux-foundation.org \
    --cc=walken@google.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 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.