Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 03:50:02 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319933 - head/sys/dev/md
Message-ID:  <201706140350.v5E3o2jA053811@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Jun 14 03:50:02 2017
New Revision: 319933
URL: https://svnweb.freebsd.org/changeset/base/319933

Log:
  Free the request page if an I/O error occurs while reading from swap.
  
  After such a failure, the page is invalid, so there's point in keeping it
  around. Moreover, such pages were not being inserted into the active queue,
  making them unreclaimable until a subsequent write or delete made them
  valid.
  
  Reported by:	alc
  Reviewed by:	alc (previous revision)
  MFC after:	1 week

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

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Wed Jun 14 03:45:26 2017	(r319932)
+++ head/sys/dev/md/md.c	Wed Jun 14 03:50:02 2017	(r319933)
@@ -1030,7 +1030,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
 				rv = vm_pager_get_pages(sc->object, &m, 1,
 				    NULL, NULL);
 			if (rv == VM_PAGER_ERROR) {
-				vm_page_xunbusy(m);
+				md_swap_page_free(m);
 				break;
 			} else if (rv == VM_PAGER_FAIL) {
 				/*
@@ -1060,7 +1060,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
 				rv = vm_pager_get_pages(sc->object, &m, 1,
 				    NULL, NULL);
 			if (rv == VM_PAGER_ERROR) {
-				vm_page_xunbusy(m);
+				md_swap_page_free(m);
 				break;
 			} else if (rv == VM_PAGER_FAIL)
 				pmap_zero_page(m);
@@ -1085,7 +1085,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
 				rv = vm_pager_get_pages(sc->object, &m, 1,
 				    NULL, NULL);
 			if (rv == VM_PAGER_ERROR) {
-				vm_page_xunbusy(m);
+				md_swap_page_free(m);
 				break;
 			} else if (rv == VM_PAGER_FAIL) {
 				md_swap_page_free(m);



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