Re: [PATCH] futex: add FUTEX_SET_WAIT operation

From: Darren Hart
Date: Thu Nov 19 2009 - 18:14:07 EST


Michel Lespinasse wrote:


On Thu, Nov 19, 2009 at 9:03 AM, Darren Hart <dvhltc@xxxxxxxxxx <mailto:dvhltc@xxxxxxxxxx>> wrote:

Michel Lespinasse wrote:

On Tue, Nov 17, 2009 at 08:16:06AM -0800, Darren Hart wrote:

http://git.kernel.org/?p=linux/kernel/git/dvhart/futextest.git

Michael, would you be willing to include a version of this
test in the above test suite? If so, then in keeping with
the rest of the test suite, I would recommend splitting into
two tests, one of each opcode being tested, and add
argument to define thread count. The run.sh script would
then run each thread count as a separate test run.


There you go. Hope this helps. Feel free to adapt as needed.

Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx
<mailto:walken@xxxxxxxxxx>>


My core-duo laptop hung after 256 threads. I left it running all
night and woke to it still sitting at:

256 threads: 11792 Kiter/s (14.18s user 0.28s system 8.48s wall 1.71
cores)

Have experienced a hang with this test on any platform? I'll take a
closer look at the source today to see if there is anything in there
that requires a certain number of CPUs to function properly.


Which test were you running, futex_wait_test or futex_setwait_test ?

This is futex_wait_test


This is not supposed to require any particular number of CPUs, so I am concerned about the hang.

How reproducible is this for you ? Do you know if the original test code I sent hanged in the same way ?

I'm basically 2 for 2 on each version of the futex_wait_test. I haven't seen it run to completion yet. This is on a stock Ubuntu kernel (2.6.31-15-generic) on my core duo laptop (32 bit).

Futex locking constructs are tricky. I'll spend some time looking over the barriers and locks used in the test. I tried to do some simple instrumenting, but that masked the hang (not unexpectedly). I'll keep looking.

--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
--
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/