Date: Mon, 27 Aug 2012 13:39:42 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Alan Cox <alc@rice.edu> Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? Message-ID: <20120827113942.GA51298@onelab2.iet.unipi.it> In-Reply-To: <503B24E4.6090701@rice.edu> References: <20120823163145.GA3999@onelab2.iet.unipi.it> <50366398.2070700@rice.edu> <20120823174504.GB4820@onelab2.iet.unipi.it> <50371485.1020409@rice.edu> <20120824145708.GA16557@onelab2.iet.unipi.it> <5037A803.6030100@rice.edu> <20120824165428.GA17495@onelab2.iet.unipi.it> <5037B226.3000103@rice.edu> <20120826171126.GA40672@onelab2.iet.unipi.it> <503B24E4.6090701@rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120827113942.GA51298>