Re: [PATCH 2] Little fixes to previous futex patch

From: Ingo Molnar
Date: Sun Sep 07 2003 - 02:24:32 EST



btw., regarding this fix:

ChangeSet@xxxxxxxxxx, 2003-09-06 12:28:20-07:00, hugh@xxxxxxxxxxx
[PATCH] Fix futex hashing bugs

why dont we do this:

} else {
/* Make sure to stop if key1 == key2 */
if (head1 == head2)
break;
list_add_tail(i, head2);
this->key = key2;
if (ret - nr_wake >= nr_requeue)
break;
}

instead of the current:

} else {
list_add_tail(i, head2);
this->key = key2;
if (ret - nr_wake >= nr_requeue)
break;
/* Make sure to stop if key1 == key2 */
if (head1 == head2 && head1 != next)
head1 = i;
}

what's the point in requeueing once, and then exiting the loop by changing
the loop exit condition variable? You are trying to avoid the lockup but
the first one ought to be the most straightforward way to do it.

Ingo



-
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/