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

From: Darren Hart
Date: Thu Apr 23 2009 - 13:30:49 EST


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