[PATCH] shrink check_nmi_watchdog stack frame
This patch for 2.5.28 reduces the stack frame size of arch/i386/kernel/nmi.c:check_nmi_watchdog() from 4096 bytes in the worst case to 128 bytes. The problem with the current code is that it copies the entire irq_stat[] array, when only a single field (__nmi_count) is of interest. The irq_stat_t element type is only 28 bytes, but it is also ____cacheline_aligned, and that blows the array up to 4096 bytes on SMP P4 Xeons, 2048 bytes on SMP K7s, and 1024 bytes on SMP P5/P6s. The patch reduces this to NR_CPUS*4==128 bytes.
Showing
Please register or sign in to comment