lkml.org 
[lkml]   [2012]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH v1 5/9] ima: allocating iint improvements
From
On Wed, Feb 1, 2012 at 6:58 PM, Eric Paris <eparis@parisplace.org> wrote:
> On Mon, Jan 30, 2012 at 5:14 PM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
>> From: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
>>
>
>>  static struct rb_root integrity_iint_tree = RB_ROOT;
>> -static DEFINE_SPINLOCK(integrity_iint_lock);
>> +static DEFINE_RWLOCK(integrity_iint_lock);
>>  static struct kmem_cache *iint_cache __read_mostly;
>
> Has any profiling been done here?   rwlocks have been shown to
> actually be slower on multi processor systems in a number of cases due
> to the cache line bouncing required.  I believe the current kernel
> logic is that if you have a short critical section and you can't show
> profile data the rwlocks are better, just stick with a spinlock.

No, I have not done any profiling.
My assumption was that rwlocks are better when there many readers.
If what you say is true then rwlocks are useless...
With big sections it is necessary to use rw semaphores.

- Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-01 19:49    [W:0.046 / U:2.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site