Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2009 02:50:31 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188908 - head/sys/dev/md
Message-ID:  <200902220250.n1M2oV2E082022@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sun Feb 22 02:50:31 2009
New Revision: 188908
URL: http://svn.freebsd.org/changeset/base/188908

Log:
  Remove unnecessary page queues locking around vm_page_wakeup().  (This
  change is applicable to RELENG_7 but not RELENG_6.)
  
  MFC after:	1 week

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

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Sun Feb 22 01:02:25 2009	(r188907)
+++ head/sys/dev/md/md.c	Sun Feb 22 02:50:31 2009	(r188908)
@@ -629,9 +629,7 @@ mdstart_swap(struct md_s *sc, struct bio
 			if (rv == VM_PAGER_ERROR) {
 				sf_buf_free(sf);
 				sched_unpin();
-				vm_page_lock_queues();
 				vm_page_wakeup(m);
-				vm_page_unlock_queues();
 				break;
 			}
 			bcopy((void *)(sf_buf_kva(sf) + offs), p, len);
@@ -641,9 +639,7 @@ mdstart_swap(struct md_s *sc, struct bio
 			if (rv == VM_PAGER_ERROR) {
 				sf_buf_free(sf);
 				sched_unpin();
-				vm_page_lock_queues();
 				vm_page_wakeup(m);
-				vm_page_unlock_queues();
 				break;
 			}
 			bcopy(p, (void *)(sf_buf_kva(sf) + offs), len);
@@ -655,9 +651,7 @@ mdstart_swap(struct md_s *sc, struct bio
 			if (rv == VM_PAGER_ERROR) {
 				sf_buf_free(sf);
 				sched_unpin();
-				vm_page_lock_queues();
 				vm_page_wakeup(m);
-				vm_page_unlock_queues();
 				break;
 			}
 			bzero((void *)(sf_buf_kva(sf) + offs), len);
@@ -667,8 +661,8 @@ mdstart_swap(struct md_s *sc, struct bio
 		}
 		sf_buf_free(sf);
 		sched_unpin();
-		vm_page_lock_queues();
 		vm_page_wakeup(m);
+		vm_page_lock_queues();
 		vm_page_activate(m);
 		if (bp->bio_cmd == BIO_WRITE)
 			vm_page_dirty(m);



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