From owner-freebsd-current@FreeBSD.ORG Mon Aug 27 11:20:34 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BDDD106567D; Mon, 27 Aug 2012 11:20:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 14AAF8FC1C; Mon, 27 Aug 2012 11:20:33 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A9C8C7300A; Mon, 27 Aug 2012 13:39:42 +0200 (CEST) Date: Mon, 27 Aug 2012 13:39:42 +0200 From: Luigi Rizzo To: Alan Cox Message-ID: <20120827113942.GA51298@onelab2.iet.unipi.it> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <503B24E4.6090701@rice.edu> User-Agent: Mutt/1.4.2.3i Cc: alc@freebsd.org, current@freebsd.org Subject: Re: less aggressive contigmalloc ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 11:20:34 -0000 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