[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317396317.12973.5.camel@twins>
Date: Fri, 30 Sep 2011 17:25:17 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Matt Fleming <matt@...sole-pimps.org>
Cc: Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
linux-kernel@...r.kernel.org, Tony Luck <tony.luck@...el.com>,
Matt Fleming <matt.fleming@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Anirudh Badam <abadam@...princeton.edu>
Subject: Re: [RFC][PATCH 2/5] signal: Add rwlock to protect sighand->action
On Fri, 2011-09-30 at 16:12 +0100, Matt Fleming wrote:
>
> As sighand->action is read much more frequently than written a rwlock
> makes the most sense here.
Ha! you would think so, but then you'd forget that
read_lock()+read_unlock() are atomic ops modifying the lock state as
well. Furthermore rwlocks aren't fair by any means.
Therefore rwlock_t should never be used, use a spinlock_t possibly in
combination with RCU or seqcount etc..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists