From owner-svn-src-all@FreeBSD.ORG Thu Jul 11 20:33:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1BC0FE62; Thu, 11 Jul 2013 20:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E091136C; Thu, 11 Jul 2013 20:33:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BKXvsM012005; Thu, 11 Jul 2013 20:33:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BKXvFf012004; Thu, 11 Jul 2013 20:33:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307112033.r6BKXvFf012004@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 11 Jul 2013 20:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253221 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 20:33:58 -0000 Author: kib Date: Thu Jul 11 20:33:57 2013 New Revision: 253221 URL: http://svnweb.freebsd.org/changeset/base/253221 Log: When swap pager allocates metadata in the pagedaemon context, allow it to drain the reserve. This was broken in r243040, causing deadlock. Note that VM_WAIT call in case of uma_zalloc() failure from pagedaemon would only wait for the v_pageout_free_min anyway. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Jul 11 20:09:46 2013 (r253220) +++ head/sys/vm/swap_pager.c Thu Jul 11 20:33:57 2013 (r253221) @@ -1855,7 +1855,8 @@ retry: if (swapblk == SWAPBLK_NONE) goto done; - swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT); + swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT | + (curproc == pageproc ? M_USE_RESERVE : 0)); if (swap == NULL) { mtx_unlock(&swhash_mtx); VM_OBJECT_WUNLOCK(object);