Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2013 20:12:23 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255080 - head/sys/dev/md
Message-ID:  <201308302012.r7UKCNvK083374@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Aug 30 20:12:23 2013
New Revision: 255080
URL: http://svnweb.freebsd.org/changeset/base/255080

Log:
  Give the page allocations initiated by the swap-backed md(4) a higher
  priority.  If the write is requested by a system daemon, sleeping
  there would starve resources and cause deadlock.
  
  Reported and tested by:	pho
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Fri Aug 30 20:10:01 2013	(r255079)
+++ head/sys/dev/md/md.c	Fri Aug 30 20:12:23 2013	(r255080)
@@ -826,7 +826,7 @@ mdstart_swap(struct md_s *sc, struct bio
 	vm_object_pip_add(sc->object, 1);
 	for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) {
 		len = ((i == lastp) ? lastend : PAGE_SIZE) - offs;
-		m = vm_page_grab(sc->object, i, VM_ALLOC_NORMAL);
+		m = vm_page_grab(sc->object, i, VM_ALLOC_SYSTEM);
 		if (bp->bio_cmd == BIO_READ) {
 			if (m->valid == VM_PAGE_BITS_ALL)
 				rv = VM_PAGER_OK;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308302012.r7UKCNvK083374>