From owner-svn-src-all@FreeBSD.ORG Tue Jun 3 08:59:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAEBAD85; Tue, 3 Jun 2014 08:59:45 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB6A2F71; Tue, 3 Jun 2014 08:59:44 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s538xfEh019166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 3 Jun 2014 12:59:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s538xf2O019165; Tue, 3 Jun 2014 12:59:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 3 Jun 2014 12:59:41 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net Message-ID: <20140603085941.GW50679@FreeBSD.org> References: <201406021754.s52Hsd1B039620@svn.freebsd.org> <1401735801.20883.103.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Marcel Moolenaar , Ian Lepore , "svn-src-all@freebsd.org" , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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, 03 Jun 2014 08:59:45 -0000 On Mon, Jun 02, 2014 at 12:27:47PM -0700, Adrian Chadd wrote: A> >> > .. and actually, bikeshedding for a moment, would we be able to move a A> >> > lot of these accessor methods over to inlines? Would that break the A> >> > Juniper way of doing things? A> >> A> >> That would definitely break Juniper as it doesn't give a stable A> >> ABI. A> >> A> >> I've suggested an approach that allows for both, but it was deemed A> >> unnecessary. The argument being that the function call overhead is A> >> negligible. A> >> A> >> We can always revisit that decision if needed... A> >> A> > A> > In my experience, function call overhead is anything but minimal, A> > especially on ARM platforms. A> A> Same on MIPS. And same on amd64. While benchmarking the counter(9), I even encountered artifacts when function call was faster than inline. Of course, function call shouldn't be via a pointer. -- Totus tuus, Glebius.