[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <987664A83D2D224EAE907B061CE93D53015D9B14DC@orsmsx505.amr.corp.intel.com>
Date: Mon, 30 Aug 2010 11:17:25 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Hedi Berriche <hedi@....com>
CC: Petr Tesarik <ptesarik@...e.cz>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: Serious problem with ticket spinlocks on ia64
> I may tinker with this test a bit to include some short random
> amounts of hold-time for the lock, and delays between attempts
> to acquire it (to make it look more like a contended kernel lock
> and less like a continuous queue of processes trading around a
> lock that is never free
I've been iterating ... adding new bits to try to reproduce the
kernel environment:
1) Added delays (bigger delay not holding the lock than holding
it - so contention is controlled)
2) Check that locking actually works (with a critzone element that
is only modified when the lock is held).
3) Sometimes use trylock (all the odd numbered threads do this).
Compile with -frename-registers ... and add a nop() { } function
in another file (just to make sure the compiler doesn't optimize
the delay loops).
Sadly ... my user mode experiments haven't yet yielded any cases
where the ticket locks fail in the way that Petr saw them mess up
inside the kernel. This latest version has been running for ~90
minutes and has completed 25 million lock/trylock iterations (with
about a third of the ticket lock wraparounds passing through the
uncontested case (lock == 0) and the rest happening with some
processes waiting for the lock.
So now I'm trying to think of other ways that the kernel case
differs from my user mode mock-up.
-Tony
View attachment "spinwrap.c" of type "text/plain" (12024 bytes)
Powered by blists - more mailing lists