linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David McCullough <davidm@snapgear.com>
To: Bernardo Innocenti <bernie@develer.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	"David S. Miller" <davem@redhat.com>,
	uclinux-dev@uclinux.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Ungerer <gerg@snapgear.com>
Subject: Re: [uClinux-dev] Kernel 2.6 size increase - get_current()?
Date: Thu, 24 Jul 2003 15:06:55 +1000	[thread overview]
Message-ID: <20030724050655.GA11947@beast> (raw)
In-Reply-To: <200307240100.00632.bernie@develer.com>


Jivin Bernardo Innocenti lays it down ...
> On Thursday 24 July 2003 00:37, Alan Cox wrote:
> 
> > On Mer, 2003-07-23 at 23:35, Bernardo Innocenti wrote:
> > > It's a sequence of 6 instructions, 18 bytes long, clobbering 4 registers.
> > > The compiler cannot see around it.
> > > This takes 18*11 = 198 bytes just for invoking the 'current'
> > > macro so many times.
> >
> > Unless you support SMP I'm not sure I understand why m68k nommu changed
> > from using a global for current_task ?
> 
> The people who might know best are Greg and David from SnapGear.
> I'm appending them to the Cc list.
> 
> But I noticed that most archs in 2.6 do like this. Is it some kind
> of flock-effect? Things get changed in i386 and all other archs
> just follow... :-)

It's a little this way for sure.

Back when I first did the 2.4 uClinux port,  the m68k MMU code was
dedicating a register (a2) for current.  I thought that was a bad idea
given how often you run out of registers on the 68k,  and made it a
global.  Because it was still effectively a pointer,  the code size
change was not a factor.  I just didn't want to give up a register.
So that is the 2.4 history and it has served us well so far ;-)

On the 2.5/2.6 front,  I think the change comes from the 8K (2 page) task
structure and everyone just masking the kernel stack pointer to get the
task pointer.  Gerg would know for sure,  he did the 2.5 work in this area.
We should be easily able to switch back to the current_task pointer with a
few small mods to entry.S.

A general comment on the use of inline throughout the kernel.  Although
they may show gains on x86 platforms,  they often perform worse on 
embedded processors with limited cache,  as well as adding size.  I
can't see any way of coding around this though.  As long as x86 is
driving influence,  other platforms will jut have to deal with it as
best they can.

Cheers,
Davidm

-- 
David McCullough, davidm@snapgear.com  Ph:+61 7 34352815 http://www.SnapGear.com
Custom Embedded Solutions + Security   Fx:+61 7 38913630 http://www.uCdot.org

  reply	other threads:[~2003-07-24  4:53 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 18:46 Kernel 2.6 size increase Bernardo Innocenti
2003-07-23 19:14 ` Richard B. Johnson
2003-07-23 20:07   ` David S. Miller
2003-07-23 21:47     ` Randy.Dunlap
2003-07-23 19:32 ` [uClinux-dev] " Christoph Hellwig
2003-07-23 20:11   ` David S. Miller
2003-07-23 20:15     ` Christoph Hellwig
2003-07-23 20:22       ` David S. Miller
2003-07-23 20:27         ` Christoph Hellwig
2003-07-23 22:35           ` [uClinux-dev] Kernel 2.6 size increase - get_current()? Bernardo Innocenti
2003-07-23 22:37             ` Alan Cox
2003-07-23 23:00               ` Bernardo Innocenti
2003-07-24  5:06                 ` David McCullough [this message]
2003-07-24 11:28                   ` Alan Cox
2003-07-24 12:04                     ` David McCullough
2003-07-24 14:48                       ` Alan Cox
2003-07-25 18:25                       ` bill davidsen
2003-07-24 15:30                     ` Hollis Blanchard
2003-07-24 19:37                       ` Alan Cox
2003-07-24 19:51                         ` Hollis Blanchard
2003-07-24 21:20                           ` J.A. Magallon
2003-07-25  4:22                             ` Otto Solares
2003-07-25 14:38                               ` Hollis Blanchard
2003-07-28  3:19                                 ` Miles Bader
2003-07-28  8:14                                   ` Ihar "Philips" Filipau
2003-07-28  8:58                                     ` Miles Bader
2003-07-28  9:03                                       ` Ihar "Philips" Filipau
2003-07-23 21:57   ` [uClinux-dev] Kernel 2.6 size increase Bernardo Innocenti
2003-07-23 22:07     ` Bernardo Innocenti
2003-07-23 22:27       ` Willy Tarreau
2003-07-23 22:34         ` Alan Cox
2003-07-24 20:27         ` Bernardo Innocenti
2003-07-25 15:46           ` Christoph Hellwig
2003-07-25 23:55             ` [PATCH] Make I/O schedulers optional (Was: Re: Kernel 2.6 size increase) Bernardo Innocenti
2003-07-26  8:17               ` Andrew Morton
2003-07-26 12:40                 ` Bernardo Innocenti
2003-07-26 14:07                   ` Jens Axboe
2003-07-26 23:42                     ` Bernardo Innocenti
2003-07-26 23:41                       ` Jens Axboe
2003-07-28 17:13             ` [uClinux-dev] Kernel 2.6 size increase Nicolas Pitre
2003-07-28 23:02               ` Bernardo Innocenti
2003-07-29  2:36                 ` Miles Bader
2003-08-08 13:25                 ` [uClinux-dev] " David Woodhouse
2003-08-08 14:37                   ` Bernardo Innocenti
2003-08-08 14:43                     ` David Woodhouse
2003-07-25 18:16           ` bill davidsen
2003-07-29 22:29           ` Tom Rini
2003-07-29 22:48             ` Alan Cox
2003-07-29 23:06               ` Tom Rini
2003-07-30  2:07                 ` Miles Bader
2003-07-30 15:33                   ` Tom Rini
2003-07-31  1:49                     ` Miles Bader
2003-07-31  4:17                       ` Tom Rini
2003-07-31  5:03                         ` Miles Bader
2003-07-31 15:24                           ` Tom Rini
2003-07-30  2:49             ` [uClinux-dev] " Bernardo Innocenti
2003-07-30 15:35               ` Tom Rini
2003-07-30 16:45                 ` [uClinux-dev] Kernel 2.6 size increase (PATCH) Bernardo Innocenti
     [not found] <cwQJ.3BO.29@gated-at.bofh.it>
     [not found] ` <cypH.5dM.35@gated-at.bofh.it>
     [not found]   ` <cyza.5lN.13@gated-at.bofh.it>
     [not found]     ` <cArg.74D.11@gated-at.bofh.it>
2003-07-24  8:13       ` [uClinux-dev] Kernel 2.6 size increase - get_current()? Ihar "Philips" Filipau
2003-07-25  7:25         ` Denis Vlasenko
2003-07-25 18:36         ` bill davidsen
2003-07-24  8:27 Ihar "Philips" Filipau
2003-07-24 11:50 ` David McCullough
     [not found] <d2nx.4QV.15@gated-at.bofh.it>
     [not found] ` <dbTZ.5Z5.19@gated-at.bofh.it>
2003-07-25 15:37   ` Ihar "Philips" Filipau

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=20030724050655.GA11947@beast \
    --to=davidm@snapgear.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bernie@develer.com \
    --cc=davem@redhat.com \
    --cc=gerg@snapgear.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dev@uclinux.org \
    --subject='Re: [uClinux-dev] Kernel 2.6 size increase - get_current()?' \
    /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

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).