Re: [rfc] [patch 1/2 ] Process private hash tables for private futexes

Darren Hart
2009-04-23T17:30:49Z

Eric Dumazet wrote:

>
> + futex_queues = alloc_large_system_hash("futexes",
> + sizeof(struct futex_hash_bucket),
> + nr_slots,
> + 0, /* scale : unused */
> + 0, /* flags */
> + NULL, /* shift */
> + &futex_hash_mask,
> + nr_slots);

OK, so I'm a little late to the party, apologies.

Minor nit (from someone who has been spending a lot of time in futex.c
trying to clean things up recently :-). Let's not comment each argument
individually. It needlessly lengthens the code. The interested user
can easily look up alloc_large_system_hash. If you feel a comment is
really needed, consider a single line before the call... I gave this
some thought and couldn't think of anything you could put there that
wouldn't still send the interested reader over to page_alloc.c.

/* Allocate futex hashtable with... <whatever is special about this> */
futex_queues = alloc_large_system_hash("futexes",
sizeof(struct futex_hash_bucket),
nr_slots, 0, 0, NULL, &futex_hash_mask,
nr_slots);

--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team