On Wed, 5 May 2010, Darren Hart wrote:
Add a non-pi TID value based futex locking mechanism. This enables the
use of adaptive spinning which was problematic with the basic FUTEX_WAIT
operation.
You still do way too much work in that spin code with way too much
code lines.
Can you try the following (completely uncompiled/untested) patch ?
Thanks,
tglx
Subject: futex-simplify.patch
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Date: Fri, 07 May 2010 17:56:38 +0200
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
kernel/futex.c | 42 ++++++++++++------------------------
kernel/sched.c | 66 ---------------------------------------------------------
2 files changed, 14 insertions(+), 94 deletions(-)
+ if (to && !to->task) {
+ ret = -ETIMEOUT;
break;
-
- if (timeout) {
- now = ktime_get();
- if (timeout->tv64 < now.tv64)
- break;
}