Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2014 06:51:32 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        David Chisnall <theraven@theravensnest.org>
Cc:        Yong-Hyeon Pyun <pyunyh@gmail.com>, Adrian Chadd <adrian@FreeBSD.org>, Marcel Moolenaar <marcel@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Marcel Moolenaar <marcel@xcllnt.net>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r266974 - in head/sys: dev/dc dev/fxp dev/mii dev/netmap kern net
Message-ID:  <20140604025132.GD50679@FreeBSD.org>
In-Reply-To: <D1E5E176-F7BD-4F13-8E09-6843038B162B@theravensnest.org>
References:  <201406021754.s52Hsd1B039620@svn.freebsd.org> <CAJ-VmonRqXrzrqQys_9s7-o8DFmOE_c_BZWupezm0i%2BW7E09vA@mail.gmail.com> <CAJ-VmonDJCLYWBPiz1ntFRm8aj4WQd5iHMKK0Wm3hcdjZmxghw@mail.gmail.com> <DA4CB2BA-A551-47A4-9E44-766FA29E2EF2@xcllnt.net> <20140603012939.GA2998@michelle.cdnetworks.com> <CAJ-Vmomt%2BHN7veD79a7h%2Bv9P4R6LdhAJpRB79yjwGd3H%2BdSpow@mail.gmail.com> <D1E5E176-F7BD-4F13-8E09-6843038B162B@theravensnest.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 03, 2014 at 06:05:50PM +0100, David Chisnall wrote:
D> On 3 Jun 2014, at 06:01, Adrian Chadd <adrian@FreeBSD.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140604025132.GD50679>