From adce2419812bbba562e45ee7a51236db0aedf9e8 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 22 Nov 2018 21:38:24 +0000 Subject: [PATCH] Annotate TDP_RFPPWAIT as unlikely. The flag is only set on vfork, but is tested for *all* syscalls. On amd64 this shortens common-case (not vfork) code. --- sys/kern/subr_syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index db0efb080b03..d6ab0bc7d275 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -230,7 +230,7 @@ syscallret(struct thread *td, int error) PROC_UNLOCK(p); } - if (td->td_pflags & TDP_RFPPWAIT) { + if (__predict_false(td->td_pflags & TDP_RFPPWAIT)) { /* * Preserve synchronization semantics of vfork. If * waiting for child to exec or exit, fork set