Re: What exactly are the issues with 2.6.0-test10 preempt?

Andi Kleen
2003-11-24T23:50:25Z

Linus Torvalds <torvalds@osdl.org> writes:
>
> 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