Skip to contentSkip to conversation

What exactly are the issues with 2.6.0-test10 preempt?

DISCUSSION Andi Kleen 3 participants 4 messages Nov 24, 2003 – Nov 25, 2003 2 messages not in the archive Char and misc drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20031124224514.56242.qmail@web40908.mail.yahoo.com.suse.lists.linux.kernel

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.58.0311241452550.15101@home.osdl.org.suse.lists.linux.kernel

Andi Kleen

author
#2 lore raw
Quoted 6 lines · Linus Torvalds

The PAGEFREE debug option works well for page allocations, but the slab cache is not very amenable to it. For slab debugging, it would be wonderful if somebody made a _truly_ debugging slab allocator that didn't use the slab cache at all, but used the page allocator (and screw the fact that you use too much memory ;) instead.

One way to find slab corruptions qickly is to write a thrasher:
identify for which slab size the corruptions happens and then write a small module that runs a thread that just allocates from that slab, writes a pattern to it, sleeps a bit, and checks the pattern (allocate multiple slabs to make it more effective). Repeat.

If you don't know the size cycle through the different cache sizes.

Me and Chris used that to track down some nasty corruptions on x86-64, it is especially useful together with LTP which calls a lot of system calls that could cause corruption.

-Andi

#3 lore raw
Quoted 14 lines · Andi Kleen
Quoted 6 lines · Linus Torvalds

The PAGEFREE debug option works well for page allocations, but the slab cache is not very amenable to it. For slab debugging, it would be wonderful if somebody made a _truly_ debugging slab allocator that didn't use the slab cache at all, but used the page allocator (and screw the fact that you use too much memory ;) instead.

One way to find slab corruptions qickly is to write a thrasher:
identify for which slab size the corruptions happens and then write a small module that runs a thread that just allocates from that slab, writes a pattern to it, sleeps a bit, and checks the pattern (allocate multiple slabs to make it more effective). Repeat.

Quoted 5 lines

If you don't know the size cycle through the different cache sizes.

Me and Chris used that to track down some nasty corruptions on x86-64, it is especially useful together with LTP which calls a lot of system calls that could cause corruption.

Do you have your code posted anywhere, and when are you going to merge it with LTP? ;)

author
#4 lore raw
Quoted 6 lines
Quoted 3 lines

Me and Chris used that to track down some nasty corruptions on x86-64, it is especially useful together with LTP which calls a lot of system calls that could cause corruption.

Do you have your code posted anywhere, and when are you going to merge it with LTP? ;)

I wrote it always custom tailored to the problem (it is not very difficult, but you often have to tune it a bit until it has the right frequency to find the corruption) Don't have one here right now, sorry. Chris had a aimed to be generic patch for 2.4 that may still be around. I don't think it would fit into current LTP because it is an kernel module (LTP doesn't have a kernel build infrastructure right now). But it would be an useful addition longer term to it I agree, once they support kernel modules.

-Andi

#5 lore raw
Quoted 7 lines · Andi Kleen
Quoted 6 lines
Quoted 3 lines

Me and Chris used that to track down some nasty corruptions on x86-64, it is especially useful together with LTP which calls a lot of system calls that could cause corruption.

Do you have your code posted anywhere, and when are you going to merge it with LTP? ;)

Quoted 7 lines

I wrote it always custom tailored to the problem (it is not very difficult, but you often have to tune it a bit until it has the right frequency to find the corruption) Don't have one here right now, sorry. Chris had a aimed to be generic patch for 2.4 that may still be around. I don't think it would fit into current LTP because it is an kernel module (LTP doesn't have a kernel build infrastructure right now). But it would be an useful addition longer term to it I agree, once they support kernel modules.

Here's my 2.4 patch, which was actually against the suse kernel so you might get fuzz/rejects for Config.in and the drivers/char/Makefile

It's fairly simple, just put the slab sizes you want into the sizes array in crasher.c

2.6 port won't be hard, if people are interested, I'll do it after Thanksgiving.

-chris

drivers/char/Config.in +2 -0
diff -ur linux.suse.1/drivers/char/Config.in linux.suse/drivers/char/Config.in
@@ -357,4 +357,6 @@
    tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
 fi
 
+tristate 'Crashing module' CONFIG_CRASHER
+
 endmenu
drivers/char/Makefile +1 -0
diff -ur linux.suse.1/drivers/char/Makefile linux.suse/drivers/char/Makefile
@@ -294,6 +294,7 @@
 obj-$(CONFIG_MIXCOMWD) += mixcomwd.o
 obj-$(CONFIG_DEADMAN) += deadman.o
 obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
+obj-$(CONFIG_CRASHER) += crasher.o
 obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o
 obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o
 obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
drivers/char/crasher.c +145 -0

145 lines not on this page · raw message