[RFC][PATCH] flexible array implementation v4

Dan Williams dan.j.williams at intel.com
Fri Aug 14 10:56:18 PDT 2009


On Fri, Jul 24, 2009 at 4:38 PM, Andrew Morton<akpm at linux-foundation.org> wrote:
> On Thu, 23 Jul 2009 08:26:47 -0700
> Dave Hansen <dave at linux.vnet.ibm.com> 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


More information about the Containers mailing list