Re: [PATCH] improve spinlock debugging

Robert Love (rml@tech9.net)
03 Dec 2001 23:30:15 -0500


On Mon, 2001-12-03 at 23:21, David S. Miller wrote:

> Keep track of how many locks are being held at once, and check if it
> is zero at switch_to() time. You can also do this to measure things
> like max number of locks held at once and other statistics.
>
> I added the first bit to sparc64 while hunting down a bug.

Another interesting idea is see if a lock is held during a call to
udelay.

Once you get a lock count, a lot is possible. I have looked into doing
some of these tests with the preemptible kernel patch. Since the
preemption count is essential the lock depth, we have quick access to
all this data.

Robert Love

-
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/