lkml.org 
[lkml]   [2009]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [rfc] "fair" rw spinlocks
From
Date
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> writes:
>
> The usual trick would be to keep per-fair-rwlock state in per-CPU
> variables. If it is forbidden to read-acquire one nestable fair rwlock
> while read-holding another, then this per-CPU state can be a single
> pointer and a nesting count. On the other hand, if it is permitted to
> read-acquire one nestable fair rwlock while holding another, then one
> can use a small per-CPU array of pointer/count pairs.

The problem is that in preemptible kernels kernel threads can switch
CPUs all the time. How would you sync the per CPU state then?

-Andi
--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2009-11-28 12:17    [W:0.155 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site