Re: [patch] nodemask: make NODEMASK_ALLOC more general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Lameter wrote:
> On Fri, 2 Oct 2009, David Rientjes wrote:
>
>> NODEMASK_ALLOC(x, m) assumes x is a type of struct, which is
>> unnecessary.
>> It's perfectly reasonable to use this macro to allocate a nodemask_t,
>> which is anonymous, either dynamically or on the stack depending on
>> NODES_SHIFT.
>
> There is currently only one user of NODEMASK_ALLOC which is
> NODEMASK_SCRATCH.
>
yes.

> Can we generalize the functionality here? The macro is basically choosing
> between a slab allocation or a stack allocation depending on the
> configured system size.
>
> NUMA_COND__ALLOC(<type>, <min numa nodes for not using stack>,
> <variablename>)
>
> or so?
>
sounds reasonable.

It seems cpumask has ifdef CONFIG_CPUMASK_OFFSTACK

> Its likely that one way want to allocate other structures on the stack
> that may get too big if large systems need to be supported.
>

maybe using the same style as cpumask will be reasonable.

Thanks,
-Kame


--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux