Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 10:14:12 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217816 - in stable/8/sys: arm/arm i386/i386 mips/mips powerpc/aim powerpc/booke sparc64/sparc64
Message-ID:  <201101251014.p0PAECs3025509@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jan 25 10:14:12 2011
New Revision: 217816
URL: http://svn.freebsd.org/changeset/base/217816

Log:
  MFC r217561:
  For architectures not using direct map , and requiring real KVA page for
  sf buf allocation, use wakeup() instead of wakeup_one() to notify sf
  buffer waiters about free buffer.
  
  sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given,
  and for simultaneous wakeup and signal delivery, msleep() returns
  EINTR/ERESTART despite the thread was selected for wakeup_one(). As
  result, we loose a wakeup, and some other waiter will not be woken up.

Modified:
  stable/8/sys/arm/arm/vm_machdep.c
  stable/8/sys/i386/i386/vm_machdep.c
  stable/8/sys/mips/mips/vm_machdep.c
  stable/8/sys/powerpc/aim/vm_machdep.c
  stable/8/sys/powerpc/booke/vm_machdep.c
  stable/8/sys/sparc64/sparc64/vm_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/arm/arm/vm_machdep.c
==============================================================================
--- stable/8/sys/arm/arm/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/arm/arm/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -175,7 +175,7 @@ sf_buf_free(struct sf_buf *sf)
 		 sf->m = NULL;
 		 LIST_REMOVE(sf, list_entry);
 		 if (sf_buf_alloc_want > 0)
-			 wakeup_one(&sf_buf_freelist);
+			 wakeup(&sf_buf_freelist);
 	 }
 	 mtx_unlock(&sf_buf_lock);				 
 #endif

Modified: stable/8/sys/i386/i386/vm_machdep.c
==============================================================================
--- stable/8/sys/i386/i386/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/i386/i386/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -916,7 +916,7 @@ sf_buf_free(struct sf_buf *sf)
 		LIST_REMOVE(sf, list_entry);
 #endif
 		if (sf_buf_alloc_want > 0)
-			wakeup_one(&sf_buf_freelist);
+			wakeup(&sf_buf_freelist);
 	}
 	mtx_unlock(&sf_buf_lock);
 }

Modified: stable/8/sys/mips/mips/vm_machdep.c
==============================================================================
--- stable/8/sys/mips/mips/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/mips/mips/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -528,7 +528,7 @@ sf_buf_free(struct sf_buf *sf)
 	SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
 	nsfbufsused--;
 	if (sf_buf_alloc_want > 0)
-		wakeup_one(&sf_freelist);
+		wakeup(&sf_freelist);
 	mtx_unlock(&sf_freelist.sf_lock);
 }
 

Modified: stable/8/sys/powerpc/aim/vm_machdep.c
==============================================================================
--- stable/8/sys/powerpc/aim/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/powerpc/aim/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -338,7 +338,7 @@ sf_buf_free(struct sf_buf *sf)
                 nsfbufsused--;
 
                 if (sf_buf_alloc_want > 0)
-                        wakeup_one(&sf_buf_freelist);
+                        wakeup(&sf_buf_freelist);
         }
         mtx_unlock(&sf_buf_lock);
 }

Modified: stable/8/sys/powerpc/booke/vm_machdep.c
==============================================================================
--- stable/8/sys/powerpc/booke/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/powerpc/booke/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -346,7 +346,7 @@ sf_buf_free(struct sf_buf *sf)
 		nsfbufsused--;
 
 		if (sf_buf_alloc_want > 0)
-			wakeup_one(&sf_buf_freelist);
+			wakeup(&sf_buf_freelist);
 	}
 	mtx_unlock(&sf_buf_lock);
 }

Modified: stable/8/sys/sparc64/sparc64/vm_machdep.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/vm_machdep.c	Tue Jan 25 08:13:31 2011	(r217815)
+++ stable/8/sys/sparc64/sparc64/vm_machdep.c	Tue Jan 25 10:14:12 2011	(r217816)
@@ -484,7 +484,7 @@ sf_buf_free(struct sf_buf *sf)
 	SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
 	nsfbufsused--;
 	if (sf_buf_alloc_want > 0)
-		wakeup_one(&sf_freelist);
+		wakeup(&sf_freelist);
 	mtx_unlock(&sf_freelist.sf_lock);
 }
 



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