linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Maximum bootable kernel size in current ARM linux
Date: Thu, 16 Sep 2010 18:51:27 +0100	[thread overview]
Message-ID: <20100916175127.GA27467@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1284657411.32513.3.camel@e102109-lin.cambridge.arm.com>

On Thu, Sep 16, 2010 at 06:16:51PM +0100, Catalin Marinas wrote:
> On Tue, 2010-09-14 at 13:37 -0400, Nicolas Pitre wrote:
> > On Tue, 14 Sep 2010, Catalin Marinas wrote:
> > 
> > > I think the Thumb-2 branch goes up to 16MB range. The Thumb-1 may be
> > > smaller but we don't support this in the kernel. That's why Thumb-2
> > > modules are within 8MB below PAGE_OFFSET. But this leaves us with
> > > maximum 8MB of kernel size.
> > 
> > Hmmm.  Would be worth moving the pkmap area below modules then.
> 
> So currently the pkmap area is at PAGE_OFFSET - 2MB. On a Thumb-2 kernel
> with highmem enabled we would have 6MB available to modules. Is this big
> enough? If not, we could move the pkmap area.
> 
> BTW, can it be moved in the top part of the memory rather than below
> PAGE_OFFSET?

If you move it to the top part of memory, then it'll be about (sizeof
low memory) bytes - 32K away from the kernel code - which means it'll
mostly always be outside of the PC relative relocation range.

Indirecting all PC relative branches through trampolines quickly becomes
expensive, not only on CPUs which don't do branch prediction, but also
because of the mixed up code and data.

What might make sense is to move the init stuff between the kernel code
and kernel data - but that leads to a penalty of possibly 8 to 16K of
wasted space in the kernel image (for section alignment.)

I think we're better of staying as we are - thereby keeping the performance
for the majority use case, and telling those few people who want a massive
kernel binary not to do that.  In the case of a large initramfs, pass it
in as an initrd, possibly using the bootp stuff I've mentioned previously
if you want a single self-contained image.

  reply	other threads:[~2010-09-16 17:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13  7:40 Maximum bootable kernel size in current ARM linux Bruce M. Penrod
2010-09-13  8:43 ` Marek Vasut
2010-09-13  9:56   ` Haojian Zhuang
2010-09-13 10:10     ` Simon Guinot
2010-09-13 10:15       ` Russell King - ARM Linux
2010-09-13 11:58         ` Matthieu CASTET
2010-09-13 12:38           ` Russell King - ARM Linux
2010-09-14 12:35       ` Dave P. Martin
2010-09-14 12:54         ` Catalin Marinas
2010-09-14 17:37           ` Nicolas Pitre
2010-09-16 17:16             ` Catalin Marinas
2010-09-16 17:51               ` Russell King - ARM Linux [this message]
2010-09-16 18:37                 ` Nicolas Pitre
2010-09-17 10:09                 ` Catalin Marinas
2010-09-16 17:58               ` Nicolas Pitre
2010-09-17 10:09                 ` Catalin Marinas
2010-09-13 10:01 ` Russell King - ARM Linux
2010-09-13 19:43   ` Bruce M. Penrod
2010-09-14 17:32     ` Nicolas Pitre
2010-09-14 17:55       ` Bruce M. Penrod
2010-09-14 18:46         ` Nicolas Pitre
2010-09-15 20:30           ` Bruce M. Penrod
2010-09-15 22:02             ` Alexander Clouter
2010-09-15 22:19             ` Nicolas Pitre

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=20100916175127.GA27467@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).