Skip to contentSkip to conversation

2.6 /proc/interrupts fails on systems with many CPUs

DISCUSSION Manfred Spraul 1 participant 1 message Nov 11, 2003

lore
Share & tools
lore
#0 lore raw

Review

Quoted 7 lines · Erik
	/* don't ask for more than the kmalloc() max size, currently 128 KB */
	if (size > 128 * 1024)
		size = 128 * 1024;
(quoted diff) +1 -1
-	buf = kmalloc(size, GFP_KERNEL);
+	buf = __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);

kmalloc needs a contiguous memory block. Thus after a long runtime, large kmalloc calls can fail due to fragmentation. I'd prefer if you switch to vmalloc after 2*PAGE_SIZE.

Or switch to a line based seq file iterator, then you wouldn't need the huge buffer. --
Manfred