Re: [patch] futex requeueing feature, futex-requeue-2.5.69-D3

Rusty Russell (rusty@rustcorp.com.au)
Tue, 20 May 2003 11:46:45 +1000


In message <3EC97996.1080800@redhat.com> you write:
> Rusty Russell wrote:
>
> > 1) Overload the last futex arg (change from timeval * to void *),
> > don't add YA arg at the end.
>
> It wasn't Ingo's idea. I suggested it. Overloading parameter types is
> evil. This isn't an issue anymore if the extension is implemented as a
> new syscall which certainly is better.

People are using the interface, so I don't think changing it because
"it's nicer this way" is worthwhile: Ingo's "new syscall" patch has
backwards compat code for the old syscalls. That's fugly 8(

So I'd say if we're going to multiplex, then overloading is easiest,
and in fact already done for FUTEX_FD.

But it's an issue over which sane people can disagree, IMHO.

> > 2) Use __alignof__(u32) not sizeof(u32). Sure, they're the same, but
> > you really mean __alignof__ here.
>
> I would always use sizeof() in this situation.

Comment says: /* Must be "naturally" aligned */. This used to be true
in a much earlier version of the code, now AFAICT the requirement test
should be:

/* Handling futexes on multiple pages? -ETOOHARD */
if (pos_in_page + sizeof(u32) > PAGE_SIZE)
return -EINVAL;

Ingo?

Thanks for the comments!
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/