On 06/06/2013 07:21 AM, Dave Chinner wrote: >> It's unclear that active_nodes is really needed - we could just iterate >> > across all items in list_lru.node[]. Are we sure that the correct >> > tradeoff decision was made here? > Yup. Think of all the cache line misses that checking > node[x].nr_items != 0 entails. If MAX_NUMNODES = 1024, there's 1024 > cacheline misses right there. The nodemask is a much more cache > friendly method of storing active node state. > > not to mention that for small machines with a large MAX_NUMNODES, > we'd be checking nodes that never have items stored on them... > >> > What's the story on NUMA node hotplug, btw? > Do we care? hotplug doesn't change MAX_NUMNODES, and if you are > removing a node you have to free all the memory on the node, > so that should already be tken care of by external code.... > Mel have already complained about this. I have a patch that makes it dynamic but I didn't include it in here because the series was already too big. I was also hoping to get it ontop of the others, to avoid disruption. I am attaching here for your appreciation. For the record, nr_node_ids is firmware provided and it is actually possible nodes, not online nodes. So hotplug won't change that.