Skip to content

Commit

Permalink
Revert "futex_requeue_pi optimization"
Browse files Browse the repository at this point in the history
This reverts commit d0aa7a7.

It not only introduced user space visible changes to the futex syscall,
it is also non-functional and there is no way to fix it proper before
the 2.6.22 release.

The breakage report ( http://lkml.org/lkml/2007/5/12/17 ) went
unanswered, and unfortunately it turned out that the concept is not
feasible at all.  It violates the rtmutex semantics badly by introducing
a virtual owner, which hacks around the coupling of the user-space
pi_futex and the kernel internal rt_mutex representation.

At the moment the only safe option is to remove it fully as it contains
user-space visible changes to broken kernel code, which we do not want
to expose in the 2.6.22 release.

The patch reverts the original patch mostly 1:1, but contains a couple
of trivial manual cleanups which were necessary due to patches, which
touched the same area of code later.

Verified against the glibc tests and my own PI futex tests.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ulrich Drepper <drepper@redhat.com>
Cc: Pierre Peiffer <pierre.peiffer@bull.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Jun 18, 2007
1 parent 188e1f8 commit bd19723
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 459 deletions.
9 changes: 1 addition & 8 deletions include/linux/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ union ktime;
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_CMP_REQUEUE_PI 9

#define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG
Expand Down Expand Up @@ -97,15 +96,10 @@ struct robust_list_head {
*/
#define FUTEX_OWNER_DIED 0x40000000

/*
* Some processes have been requeued on this PI-futex
*/
#define FUTEX_WAITER_REQUEUED 0x20000000

/*
* The rest of the robust-futex field is for the TID:
*/
#define FUTEX_TID_MASK 0x0fffffff
#define FUTEX_TID_MASK 0x3fffffff

/*
* This limit protects against a deliberately circular list.
Expand Down Expand Up @@ -139,7 +133,6 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi);
#define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */

union futex_key {
u32 __user *uaddr;
struct {
unsigned long pgoff;
struct inode *inode;
Expand Down
Loading

0 comments on commit bd19723

Please sign in to comment.