From owner-svn-src-head@FreeBSD.ORG Sun Nov 23 16:22:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AF822C3; Sun, 23 Nov 2014 16:22:43 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 09C7A895; Sun, 23 Nov 2014 16:22:42 +0000 (UTC) Received: from [192.168.0.106] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.9/8.14.9) with ESMTP id sANGMSc9074685 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 23 Nov 2014 16:22:34 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52] claimed to be [192.168.0.106] Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r274489 - in head/sys/amd64: amd64 include From: David Chisnall In-Reply-To: <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> Date: Sun, 23 Nov 2014 16:22:23 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <426D8696-801A-4C48-A2FE-74575B4B79E7@FreeBSD.org> References: <201411132211.sADMBjP3009246@svn.freebsd.org> <35E5EAD8-99C1-43C0-8D01-B3B5B86ECA25@me.com> <13EC3116-6146-42FC-8941-2C7C009224B3@yahoo.com> To: Scott Long X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Scott Long , Rui Paulo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2014 16:22:43 -0000 On 21 Nov 2014, at 23:26, Scott Long wrote: > That=92s a good question to look further into. I didn=92t see any = measurable differences with this change. I think that the cost of the = function call itself masks the cost of a few extra instructions, but I = didn=92t test with switching it on/off for the entire kernel [ Note: The following is not specific to the kernel ] The overhead for preserving / omitting the frame pointer is decidedly = nonlinear. On a modern superscalar processor, it will usually be = effectively zero, right up until the point that it pushes something out = of the instruction cache on a hot path, at which point it jumps to = 20-50%, depending on the workload. The performance difference was more pronounced on i386, where having an = extra GPR for the register allocator to use could make a 10-20% = performance difference on some fairly common code (the two big = performance wins for x86-64 over IA32 were the increase in number of = GPRs and an FPU ISA that wasn't batshit insane). For ISAs with more = GPRs, that's less of an issue, although after inlining being able to use = %rbp as a GPR can sometimes make a noticeable difference in performance. = In particular, as %rpb is callee-save, it's very useful to be able to = use it in non-leaf functions. David