[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1267714704.25158.199.camel@laptop>
Date: Thu, 04 Mar 2010 15:58:24 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Nick Piggin <npiggin@...e.de>
Cc: Miao Xie <miaox@...fujitsu.com>,
David Rientjes <rientjes@...gle.com>,
Lee Schermerhorn <lee.schermerhorn@...com>,
Paul Menage <menage@...gle.com>,
Linux-Kernel <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>, tglx <tglx@...utronix.de>
Subject: Re: [PATCH 4/4] cpuset,mm: use rwlock to protect task->mempolicy
and mems_allowed
On Thu, 2010-03-04 at 14:30 +1100, Nick Piggin wrote:
>
> Thanks for working on this. However, rwlocks are pretty nasty to use
> when you have short critical sections and hot read-side (they're twice
> as heavy as even spinlocks in that case).
Should we add a checkpatch.pl warning for them?
There really rarely is a good case for using rwlock_t, for as you say
they're a pain and often more expensive than a spinlock_t, and if
possible RCU has the best performance.
--
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