With 2.6.2-rc1-mm3 I started getting occasional double faults when idle. Seemed to be irqbalance (with NR_CPUS 2) using new bitmap_parse calling bitmap_shift_right: collapse when it reloads %esp with 0 before return. Google tells me that there were compiler code generation problems around here before, but I didn't track down quite what: are we sure they've been eliminated? Disassembly of bitmap_shift_right attached, that's with an RH 3.2.3-20 gcc, but I see similar code from more recent SuSE 3.3.2 gcc: sub $0x4,%esp ... sub %eax,%esp ... lea 0x1b(%esp,1),%esi CONFIG_CPU_PENTIUMIII=y; and I do have CONFIG_FRAME_POINTER=y, but it looks like that makes no difference, that this alloca kind of code uses frame pointer anyway. I've tried but failed to produce similar disassembly compiling outside the kernel, despite using kernel cflags. If you think there is still a code generation problem here with popular versions of gcc, perhaps we should stop that variable stack declaration? Hugh --- 2.6.2-rc2-mm2/lib/bitmap.c 2004-01-25 18:04:19.000000000 +0000 +++ linux/lib/bitmap.c 2004-01-30 20:44:44.000000000 +0000 @@ -12,6 +12,8 @@ #include #include +#define MAX_BITMAP_BITS 512U /* for ia64 NR_CPUS maximum */ + int bitmap_empty(const unsigned long *bitmap, int bits) { int k, lim = bits/BITS_PER_LONG; @@ -73,8 +75,9 @@ const unsigned long *src, int shift, int bits) { int k; - DECLARE_BITMAP(__shr_tmp, bits); + DECLARE_BITMAP(__shr_tmp, MAX_BITMAP_BITS); + BUG_ON(bits > MAX_BITMAP_BITS); bitmap_clear(__shr_tmp, bits); for (k = 0; k < bits - shift; ++k) if (test_bit(k + shift, src)) @@ -87,8 +90,9 @@ const unsigned long *src, int shift, int bits) { int k; - DECLARE_BITMAP(__shl_tmp, bits); + DECLARE_BITMAP(__shl_tmp, MAX_BITMAP_BITS); + BUG_ON(bits > MAX_BITMAP_BITS); bitmap_clear(__shl_tmp, bits); for (k = bits; k >= shift; --k) if (test_bit(k - shift, src))