Re: test6-lowlatency-D1 results: 50msec + hangs ....

David S. Miller (davem@redhat.com)
Sat, 5 Aug 2000 17:52:26 -0700


Date: Sun, 6 Aug 2000 01:43:04 +0100
From: Philipp Rumpf <prumpf@parcelfarce.linux.theplanet.co.uk>

That's bogus on UP (spin_is_locked always returns 0).

I think it would be reasonably nice to have something like

spin_lock_held(spinlock_t *lock);

that returns 1 for UP and spin_is_locked(lock) for SMP - basically

Really, whatever you name it, the question of a lock being held or not
on UP has zero meaning. There is no correct return value, period.

No matter what constant answer you decide to give on UP it will always
be incorrect. I know, because there were old bits of assertions in
the networking I had to remove mid-2.3.x which really wanted
spin_is_locked() to return either answer in various cases for the
assertions to pass.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/