Re: less aggressive contigmalloc ?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Mon, 27 Aug 2012 13:39:42 +0200
On Mon, Aug 27, 2012 at 02:42:28AM -0500, Alan Cox wrote:
...
> >this is dmesg when I add kdb_backtrace()  at the start of vm_pageout_oom()
> >The '... netmap_finalize_obj_allocator... are from my calls to
> >contigmalloc, each one doing one-page allocations.
> 
> These calls are made with M_WAITOK?

no they are with M_NOWAIT:

	...
	clust = contigmalloc(p->_clustsize, M_NETMAP, M_NOWAIT | M_ZERO,
	    0, -1UL, PAGE_SIZE, 0);
	...

p->_clustsize is 4096 in this particular set of calls.

> >I get 7-8 'KDB: stack backtrace' blocks, then allocations
> >restart successfully, then more failures...
> >The reference to fork_exit() does not seem right, because i am
> >in a block where i call contigmalloc, so the caller of
> >vm_pageout_grow_cache() should be kmem_alloc_contig().
> 
> Try this instead.  At the start of vm_pageout_oom(), print the value of 
> its parameter "shortage".  That will uniquely identify the caller.

it says "shortage is 1" which means that the call is from vm_pageout().

cheers
luigi
Received on Mon Aug 27 2012 - 09:20:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC