From owner-svn-src-all@FreeBSD.ORG Wed Jun 4 02:52:19 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 42ECB4E4 for ; Wed, 4 Jun 2014 02:52:19 +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 B50E42705 for ; Wed, 4 Jun 2014 02:52:18 +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 s542pW0T024467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Jun 2014 06:51:32 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s542pWoA024466; Wed, 4 Jun 2014 06:51:32 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 4 Jun 2014 06:51:32 +0400 From: Gleb Smirnoff To: David Chisnall Subject: Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net Message-ID: <20140604025132.GD50679@FreeBSD.org> References: <201406021754.s52Hsd1B039620@svn.freebsd.org> <20140603012939.GA2998@michelle.cdnetworks.com> 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: Yong-Hyeon Pyun , Adrian Chadd , Marcel Moolenaar , "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: Wed, 04 Jun 2014 02:52:19 -0000 On Tue, Jun 03, 2014 at 06:05:50PM +0100, David Chisnall wrote: D> On 3 Jun 2014, at 06:01, Adrian Chadd wrote: D> D> > I wonder if in the short term we should just use inlines for now, at D> > least so the methodization can get done without hurting people on D> > ARM/MIPS. D> D> It's probably worth thinking a bit more carefully about the KPI, since it's something we'll likely be stuck with for a long time... D> D> If access to a particular field is on the hot path, and you're never going to want to do interposition, then the obvious thing to do is have a method that returns a pointer to the field so that you can cache it in the caller. Some thought needs to be given there as to whether these things are _Atomic() qualified for when we (eventually) move to C11 for the kernel. Yes, this is the plan. Some high performance drivers can cache pointers to partial contents of an ifnet(9). -- Totus tuus, Glebius.