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

From: Andrew Morton
Date: Mon Jun 19 2006 - 03:59:12 EST


On Mon, 19 Jun 2006 09:02:29 +0200
Ingo Molnar <mingo@xxxxxxx> wrote:

> Subject: increase spinlock-debug looping timeouts from 1 sec to 1 min

But it's broken. In the non-debug case we subtract RW_LOCK_BIAS so we know
that the writer will get the lock when all readers vacate. But in the
CONFIG_DEBUG_SPINLOCK case we don't do that, with the result that taking a
write_lock can take over a second.

A much, much better fix (which involves visiting all architectures) would
be to subtract RW_LOCK_BIAS and _then_ wait for a second.

OK, it's only debug code. But RH (for one) have decided to ship zillions
of kernels with this debug code turned on.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/