svn commit: r338885 - head/sys/sys

Mateusz Guzik mjg at FreeBSD.org
Sat Sep 22 11:39:31 UTC 2018


Author: mjg
Date: Sat Sep 22 11:39:30 2018
New Revision: 338885
URL: https://svnweb.freebsd.org/changeset/base/338885

Log:
  vfs: __predict common case in VFS_EPILOGUE/PROLOGUE
  
  NFS is the only in-tree filesystem using the feature, but all ops test
  for it.
  
  Currently the resulting sigdefer calls have to be jumped over in the
  common case.
  
  This is a bandaid, longer term fix will move this feature away.
  
  Approved by:	re (kib)

Modified:
  head/sys/sys/signalvar.h

Modified: head/sys/sys/signalvar.h
==============================================================================
--- head/sys/sys/signalvar.h	Sat Sep 22 06:50:56 2018	(r338884)
+++ head/sys/sys/signalvar.h	Sat Sep 22 11:39:30 2018	(r338885)
@@ -349,7 +349,7 @@ static inline int
 sigdeferstop(int mode)
 {
 
-	if (mode == SIGDEFERSTOP_NOP)
+	if (__predict_true(mode == SIGDEFERSTOP_NOP))
 		return (SIGDEFERSTOP_VAL_NCHG);
 	return (sigdeferstop_impl(mode));
 }
@@ -358,7 +358,7 @@ static inline void
 sigallowstop(int prev)
 {
 
-	if (prev == SIGDEFERSTOP_VAL_NCHG)
+	if (__predict_true(prev == SIGDEFERSTOP_VAL_NCHG))
 		return;
 	sigallowstop_impl(prev);
 }


More information about the svn-src-head mailing list