Re: vmalloc_node

Dave Hansen
2005-09-26T18:10:47Z

On Mon, 2005-09-26 at 10:58 -0700, Christoph Lameter wrote:
> On Fri, 23 Sep 2005, Dave Hansen wrote:
> > Instead of hard-coding all of those -1's for the node to specify a
> > default allocation, and changing all of those callers, why not:
>
> Done.

That looks much nicer. Thanks!

> > __vmalloc_node(size, gfp_mask, prot, -1);
> > A named macro is probably better than -1, but if it is only used in one
> > place, it is hard to complain.
>
> -1 is used consistently in the *_node functions to indicate that the node
> is not specified. Should I replace -1 throughout the kernel with a
> constant?

I certainly wouldn't mind. Giving it a name like NODE_ANY or
NODE_UNSPECIFIED would certainly keep anyone from having to go dig into
the allocator functions to decide what it actually does.

-- Dave