Re: [RFC][PATCH] flexible array implementation v4
From: Dan Williams
Date: Fri Aug 14 2009 - 13:56:36 EST
On Fri, Jul 24, 2009 at 4:38 PM, Andrew Morton<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 23 Jul 2009 08:26:47 -0700
> Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> wrote:
>
>> linux-2.6.git-dave/include/linux/flex_array.h | 46 ++++
>> linux-2.6.git-dave/lib/Makefile | 2
>> linux-2.6.git-dave/lib/flex_array.c | 269 ++++++++++++++++++++++++++
>
> I haven't looked at this lately but I merged it.
>
> As it's obviously non-injurious, we could slip it into 2.6.31 for
> convenience's sake but without any callers that's just runtime bloat.
> So I guess we wait for some additional callers to come along and prove
> its worth.
>
I am considering using this for managing the descriptor ring in a
device driver, but I am concerned with the overhead of the divides.
Would it be acceptable to round the element size to the next
power-of-2 value so we can replace all the divides with shifts?
Thanks,
Dan
--
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/