Re: [patch] nodemask: make NODEMASK_ALLOC more general

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

 



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.

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?

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.


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