From owner-svn-src-all@FreeBSD.ORG Tue Jan 7 14:03:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01B6EF40; Tue, 7 Jan 2014 14:03:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E23541A58; Tue, 7 Jan 2014 14:03:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07E3gvc033464; Tue, 7 Jan 2014 14:03:42 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07E3gAe033463; Tue, 7 Jan 2014 14:03:42 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201401071403.s07E3gAe033463@svn.freebsd.org> From: Attilio Rao Date: Tue, 7 Jan 2014 14:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260393 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 14:03:43 -0000 Author: attilio Date: Tue Jan 7 14:03:42 2014 New Revision: 260393 URL: http://svnweb.freebsd.org/changeset/base/260393 Log: Use __predict_false() on sensitive lock paths as most of the times, when PMC-soft feature is not used the check will be false. Sponsored by: EMC / Isilon storage division Submitted by: Anton Rang Modified: head/sys/sys/pmckern.h Modified: head/sys/sys/pmckern.h ============================================================================== --- head/sys/sys/pmckern.h Tue Jan 7 13:09:35 2014 (r260392) +++ head/sys/sys/pmckern.h Tue Jan 7 14:03:42 2014 (r260393) @@ -110,7 +110,7 @@ struct pmckern_soft { #ifdef PMC_FAKE_TRAPFRAME #define PMC_SOFT_CALL(pr, mo, fu, na) \ do { \ - if (pmc_##pr##_##mo##_##fu##_##na.ps_running) { \ + if (__predict_false(pmc_##pr##_##mo##_##fu##_##na.ps_running)) { \ struct pmckern_soft ks; \ register_t intr; \ intr = intr_disable(); \ @@ -135,7 +135,7 @@ do { \ */ #define PMC_SOFT_CALL_TF(pr, mo, fu, na, tf) \ do { \ - if (pmc_##pr##_##mo##_##fu##_##na.ps_running) { \ + if (__predict_false(pmc_##pr##_##mo##_##fu##_##na.ps_running)) { \ struct pmckern_soft ks; \ register_t intr; \ intr = intr_disable(); \