Re: [Slub allocator] There are chances thatkmem_cache_cpu->freelist gets lost if the process happens to be rescheduledto a differenet cpu before the local_irq_save() completes in __slab_alloc()

From: Eric Dumazet
Date: Mon Dec 12 2011 - 14:31:45 EST


Le lundi 12 dÃcembre 2011 Ã 12:53 -0600, Christoph Lameter a Ãcrit :
> On Mon, 12 Dec 2011, Eric Dumazet wrote:
>
> > Indeed, I reproduced the leak with hackbench and lot of threads.
>
> Ran it here and did not see anything. But obviously this is an issue.
> Strange that no one noticed earlier. Usage of CONFIG_PREEMPT must not be
> that frequent.
>

Yes, probably :(

All I did was using hackbench with 4000 threads on my 16 cpu machine,

while :; do hackbench 100 process 2000 ; done

I got about one leak (freelist chain, so several objects leaked) per
second.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/