From owner-svn-src-all@FreeBSD.ORG Tue Jun 3 14:10:25 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 BCE1681F; Tue, 3 Jun 2014 14:10:25 +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 252492F24; Tue, 3 Jun 2014 14:10:23 +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 s53EAKk0020841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 3 Jun 2014 18:10:20 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s53EAKQt020840; Tue, 3 Jun 2014 18:10:20 +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 18:10:20 +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: <20140603141020.GB50679@FreeBSD.org> References: <201406021754.s52Hsd1B039620@svn.freebsd.org> <1401735801.20883.103.camel@revolution.hippie.lan> <20140603085941.GW50679@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140603085941.GW50679@FreeBSD.org> 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 14:10:25 -0000 On Tue, Jun 03, 2014 at 12:59:41PM +0400, Gleb Smirnoff wrote: T> On Mon, Jun 02, 2014 at 12:27:47PM -0700, Adrian Chadd wrote: T> A> >> > .. and actually, bikeshedding for a moment, would we be able to move a T> A> >> > lot of these accessor methods over to inlines? Would that break the T> A> >> > Juniper way of doing things? T> A> >> T> A> >> That would definitely break Juniper as it doesn't give a stable T> A> >> ABI. T> A> >> T> A> >> I've suggested an approach that allows for both, but it was deemed T> A> >> unnecessary. The argument being that the function call overhead is T> A> >> negligible. T> A> >> T> A> >> We can always revisit that decision if needed... T> A> >> T> A> > T> A> > In my experience, function call overhead is anything but minimal, T> A> > especially on ARM platforms. T> A> T> A> Same on MIPS. T> T> And same on amd64. While benchmarking the counter(9), I even encountered T> artifacts when function call was faster than inline. T> T> Of course, function call shouldn't be via a pointer. Sorry, I misunderstood the "anything but minimal" phrase. That's why my reply Adrian and Ian looks odd. -- Totus tuus, Glebius.