[lkml]   [2006]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] increase spinlock-debug looping timeouts from 1 sec to 1 min

* Ingo Molnar <> wrote:

> no. Write-locks are unfair too, and there's no guarantee that writes
> are listened to. That's why nested read_lock() is valid, while nested
> down_read() is invalid.
> Take a look at arch/i386/kernel/semaphore.c, __write_lock_failed()
> just adds back the RW_LOCK_BIAS and retries in a loop. There's no
> difference to an open-coded write_trylock loop - unless i'm missing
> something fundamental.

did i ever mention that i find rwlocks evil, inefficient and bug-prone,
and that we should get rid of them? :-)

(Most rwlock users can be converted to straight spinlocks just fine, but
there are a couple of places that rely on read-lock nesting. The
hardest-to-fix offenders are nested rcu_read_locks() in the netfilter
code. I gave up converting them to saner locking, PREEMPT_RCU works it
around in the -rt tree, by not being rwlock based.)

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: 2006-06-19 10:29    [W:0.069 / U:9.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site