lkml.org 
[lkml]   [2003]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH: kernel-2.4 brlock livelock

On Wed, 3 Sep 2003 linas@austin.ibm.com wrote:

> OK, how about the following: readers on a given cpu are held off if the
> write lock is held *and* the read-count on that cpu is zero?
>
> That way, 'recursive' readers on other CPU's can get a read-lock if
> there's already a non-zero read-lock-count on that CPU.
>
> That should work if the thread holding the lock can't get scheduled to
> another cpu. Can these things wander around?
>
> If they can wander around, then oone would have to order the cpus: wait
> for read count to drop to zero on cpu 0 then on 1 then on 2, meanwhile
> the read-lock can be gotten on the higher ordered CPUs ...
>
> If this sounds reasonable, would you care to see a revised patch?

could you try this approach on your box that shows the livelock situation?

certainly we can add code that only triggers if there's some write attempt
- the important thing is to have the right read-mostly behavior.

Ingo

-
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: 2005-03-22 13:48    [W:0.023 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site