]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm: purge fragmented percpu vmap blocks
authorNick Piggin <npiggin@suse.de>
Mon, 1 Feb 2010 11:25:57 +0000 (22:25 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Feb 2010 12:50:58 +0000 (04:50 -0800)
commite52299d0b100ab8d92fe6e980b4d7ee24dd1398c
treec8cb5b9c320dd9738c43f059092e7a42dc26b450
parent56d4b77f0492eb137fd950e48a7b2364f380d33d
mm: purge fragmented percpu vmap blocks

commit 02b709df817c0db174f249cc59e5f7fd01b64d92 upstream.

Improve handling of fragmented per-CPU vmaps.  We previously don't free
up per-CPU maps until all its addresses have been used and freed.  So
fragmented blocks could fill up vmalloc space even if they actually had
no active vmap regions within them.

Add some logic to allow all CPUs to have these blocks purged in the case
of failure to allocate a new vm area, and also put some logic to trim
such blocks of a current CPU if we hit them in the allocation path (so
as to avoid a large build up of them).

Christoph reported some vmap allocation failures when using the per CPU
vmap APIs in XFS, which cannot be reproduced after this patch and the
previous bug fix.

Cc: linux-mm@kvack.org
Tested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/vmalloc.c