From: Benjamin Herrenschmidt <bh40@calva.net>
To: "David A. Gatwood" <marsmail@globegate.utm.edu>,
linuxppc-dev@lists.linuxppc.org
Subject: Re: [ppc-dev] Re: Restructuring Efforts
Date: Thu, 18 Feb 1999 12:25:39 +0100 [thread overview]
Message-ID: <19990218122539.026672@mail.mipsys.com> (raw)
In-Reply-To: <Pine.LNX.3.96.990217172825.19695C-100000@globegate.utm.edu>
On Wed, Feb 17, 1999, David A. Gatwood <marsmail@globegate.utm.edu> wrote:
>Sounds a lot like a bunch of things in BSD-like kernels, where, in
>MkLinux, for instance, interrupt_heathrow.c, interrupt_pdm.c, etc. each
>have a static structure with pointers to their externally visible
>functions, and the main function checks the hardware type and assigns a
>global pointer to point to the static structure for the particular set of
>routines. Is that what you mean?
Almost ;-)
This scheme still requires one more pointer dereferencing: one to get to
the global holding the structure pointer, one to get the structure, one
to get the function.
I was thinking about filling a static structure with function pointers
instead (but the "modules" can still export a pointer to a structure, the
kernel will just copy the pointers in the structure instead of just
storing a pointer to the structure).
This way, we have one less indirection.
If the structure can be stored at a fixed address in kernel virtual space
(hummm....) then access to the function pointers can be really fast.
Of course, this is really a matter of details, but since those will be
used in a lot of performance sensitive execution path (interrupts, mm,
...), such optimisation can make a difference by avoiding unnecessary
cache misses.
Maybe we could wrap the calls to the functions themselves in macros so
that we can later change the way the mecanism is implemented.
--
E-Mail: <mailto:bh40@calva.net>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
next prev parent reply other threads:[~1999-02-18 11:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-16 16:33 Restructuring Efforts Christian Zankel
1999-02-16 20:11 ` Cort Dougan
1999-02-17 2:35 ` Troy Benjegerdes
1999-02-17 6:45 ` Cort Dougan
1999-02-17 10:53 ` Gabriel Paubert
1999-02-17 16:40 ` Troy Benjegerdes
1999-02-17 16:32 ` Benjamin Herrenschmidt
1999-02-17 12:50 ` [ppc-dev] " Bill Davidsen
1999-02-17 17:27 ` Benjamin Herrenschmidt
1999-02-17 23:44 ` David A. Gatwood
1999-02-18 11:25 ` Benjamin Herrenschmidt [this message]
1999-02-17 12:19 ` Gabriel Paubert
1999-02-18 8:44 ` Jesper Skov
1999-02-18 14:00 ` Gabriel Paubert
1999-02-18 14:26 ` Jesper Skov
1999-02-18 17:03 ` Cort Dougan
1999-02-20 4:39 ` Troy Benjegerdes
1999-02-22 20:03 ` Gabriel Paubert
1999-02-17 12:26 ` [ppc-dev] " Bill Davidsen
1999-02-17 12:12 ` Gabriel Paubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990218122539.026672@mail.mipsys.com \
--to=bh40@calva.net \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=marsmail@globegate.utm.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).