Re: [tip:locking/core] locking/rwsem: Fix lock optimistic spinning when owner is not running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip:locking/core] locking/rwsem: Fix lock optimistic spinning when owner is not running
- From: Oleg Nesterov <oleg@xxxxxxxxxx>
- Date: Tue, 10 Mar 2015 19:33:12 +0100
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, "linux-tip-commits@xxxxxxxxxxxxxxx" <linux-tip-commits@xxxxxxxxxxxxxxx>, Davidlohr Bueso <dave@xxxxxxxxxxxx>, Peter Anvin <hpa@xxxxxxxxx>, Sasha Levin <sasha.levin@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jason Low <jason.low2@xxxxxx>, Michel Lespinasse <walken@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Paul McKenney <paulmck@xxxxxxxxxxxxxxxxxx>, Dave Jones <davej@xxxxxxxxxxxxxxxxx>, Ming Lei <ming.lei@xxxxxxxxxxxxx>, Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>, Kirill Tkhai <tkhai@xxxxxxxxx>
- In-reply-to: <CA+55aFwyfhSFk69nLAsqUy44vVAH+28g7U221L-JDdz1o9f2wA@mail.gmail.com>
- User-agent: Mutt/1.5.18 (2008-05-17)
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]