Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acb7f672 authored by Jack Steiner's avatar Jack Steiner Committed by Tony Luck
Browse files

[IA64] Limit the maximum NODEDATA_ALIGN() offset



The per-node data structures are allocated with strided offsets that are a
function of the node number. This prevents excessive cache-aliasing from
occurring.

On systems with a large number of nodes, the strided offset becomes
too large. This patch restricts the maximum offset to 32MB. This is far larger
than the size of any current L3 cache.

Signed-off-by: default avatarJack Steiner <steiner@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 3ec829b6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata;
 * To prevent cache aliasing effects, align per-node structures so that they
 * start at addresses that are strided by node number.
 */
#define MAX_NODE_ALIGN_OFFSET	(32 * 1024 * 1024)
#define NODEDATA_ALIGN(addr, node)						\
	((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE)
	((((addr) + 1024*1024-1) & ~(1024*1024-1)) + 				\
	     (((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))

/**
 * build_node_maps - callback to setup bootmem structs for each node