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

* Ingo Molnar <mingo@elte.hu> 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.)

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