[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 06/12] rwsem: wake queued readers when other readers are active
On Wed, May 12, 2010 at 5:22 AM, David Howells <> wrote:
> Michel Lespinasse <> wrote:
>> In this situation, it would be perfectly fine to let threads B and C work
>> in parallel as they each only want a read acquire on the rwsem. We can
>> recognize this situation and let A wake B as long as there are no active
>> writers on the rwsem.
> There can't be any active writers on the rwsem.  An active writer must have
> just been upped and is in the process of waking the first sleeper up.

Yes. My point is that by the point thread A (the writer that just got
upped) gets around to waking B (a blocked reader), another reader C
might have gotten active already. We don't want the nonzero active
count (due to C) to prevent B from getting woken.

Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2010-05-13 04:43    [W:0.185 / U:24.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site