Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2018 04:48:22 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341180 - head/sys/kern
Message-ID:  <201811290448.wAT4mMIe063450@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Thu Nov 29 04:48:22 2018
New Revision: 341180
URL: https://svnweb.freebsd.org/changeset/base/341180

Log:
  Annotate td_cowgen check as unlikely.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/kern/subr_syscall.c

Modified: head/sys/kern/subr_syscall.c
==============================================================================
--- head/sys/kern/subr_syscall.c	Thu Nov 29 03:57:06 2018	(r341179)
+++ head/sys/kern/subr_syscall.c	Thu Nov 29 04:48:22 2018	(r341180)
@@ -66,7 +66,7 @@ syscallenter(struct thread *td)
 	sa = &td->td_sa;
 
 	td->td_pticks = 0;
-	if (td->td_cowgen != p->p_cowgen)
+	if (__predict_false(td->td_cowgen != p->p_cowgen))
 		thread_cow_update(td);
 	traced = (p->p_flag & P_TRACED) != 0;
 	if (traced || td->td_dbgflags & TDB_USERWR) {



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