Re: [patch] increase spinlock-debug looping timeouts from 1 sec to 1 min

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Ingo Molnar <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux