From: ebiederm@xmission.com (Eric W. Biederman)
To: Jan Kratochvil <lace@jankratochvil.net>
Cc: vgoyal@in.ibm.com, fastboot@osdl.org, Horms <horms@verge.net.au>,
"H. Peter Anvin" <hpa@zytor.com>,
Magnus Damm <magnus.damm@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Fastboot] [CFT] ELF Relocatable x86 and x86_64 bzImages
Date: Tue, 01 Aug 2006 03:09:28 -0600 [thread overview]
Message-ID: <m1bqr43jqv.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060801042528.GA19157@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Tue, 1 Aug 2006 06:25:28 +0200")
Jan Kratochvil <lace@jankratochvil.net> writes:
> On Tue, 01 Aug 2006 04:31:43 +0200, Eric W. Biederman wrote:
> ...
>> 4MB is a little harsh, but I haven't worked through what the exact rules
>> are, I know 4MB is the worst case alignment for arch/i386.
>>
>> The rule is that we have to be at the same offset from 4MB as we
>> were built to run at. So in this case address where (address %4MB) == 1MB.
>
> In such case your patch is not optimal. The original VA Linux Japan patch 2.0
> http://mkdump.sourceforge.net/cvs.html
> cvs -q -z3
> -d:pserver:anonymous:@mkdump.cvs.sourceforge.net:/cvsroot/mkdump rdiff -u -r
> bp_linux-2_6-minik -r linux-2_6-minik linux
> had lower alignment requirements and these were really tested that time.
>
> i386 had alignment requirement:
> /* current_thread_info()&co. are 8192-alignment fixed (for the initial
> stack). */
> #if CONFIG_PHYSICAL_START & 0x1FFF
> #error "CONFIG_PHYSICAL_START must be 2*PAGE_SIZE (0x2000) aligned!"
> #endif
> as IIRC those i386 2MB/4MB pages must be (apparently) 2MB/4MB aligned in the
> virtual address space but their physical target address can be arbitrary.
I know you can't use huge pages if your physical address is not
properly aligned. Which can be a performance impact if nothing else.
Not something I want to encourage in a general purpose kernel.
If it is actually a problem once we get past the user confusion
aspect of this I will happily revisit it. The big confusion in all of
this is that with a 4MB alignment and a 1MB offset the useable cases
are: 1MB, 5MB, 9MB, 13MB, 17MB, 21MB...
What I did that is rather unique is I actually enforce this in misc.c
so there is no way we can slip by our alignment requirements.
I'm not terribly comfortable with the 8K alignment number as we only
tell the linker we need 4K alignment. So there might be other
implicit things out there as well. Although I admit head.S may be
the only place we can get away with that kind of thing, as the linker
can move everything else around. Groan yet another kernel audit if
we go this route.
> and x86_64 alignment requirement was:
> #if (CONFIG_PHYSICAL_START - 0x100000) & 0x1FFFFF
> #error "CONFIG_PHYSICAL_START must be '2MB * x + 1MB' aligned!"
> #endif
> while IIRC those x86_64 2MB pages need to have even the physical target address
> 2MB aligned. Lower alignment would require suboptimal execution by not using
> the 2MB pages (and the patch would have to handle it appropriately).
Yes. I have that check. Except now the check really is
(CONFIG_PHYSICAL_START & 0x1FFFFF) == 0 because the x86_64 kernel lives at
2MB by default now, so it can really get the benefit of huge pages.
> ( I did not check your patches as they are locked in that useless GIT anyway. )
( As opposed to the unuseable CVS I presume :)
I guess I should just post them so we can have a sane conversation :)
Eric
next prev parent reply other threads:[~2006-08-01 9:11 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aec7e5c30606300145p441d8d0xd89fab5e87de5a22@mail.gmail.com>
[not found] ` <20060705222448.GC992@in.ibm.com>
[not found] ` <aec7e5c30607051932r49bbcc7eh2c190daa06859dcc@mail.gmail.com>
[not found] ` <20060706081520.GB28225@host0.dyn.jankratochvil.net>
[not found] ` <aec7e5c30607070147g657d2624qa93a145dd4515484@mail.gmail.com>
[not found] ` <20060707133518.GA15810@in.ibm.com>
[not found] ` <20060707143519.GB13097@host0.dyn.jankratochvil.net>
[not found] ` <20060710233219.GF16215@in.ibm.com>
[not found] ` <20060711010815.GB1021@host0.dyn.jankratochvil.net>
[not found] ` <m1d5c92yv4.fsf@ebiederm.dsl.xmission.com>
2006-07-31 16:19 ` Eric W. Biederman
2006-07-31 20:25 ` Vivek Goyal
2006-07-31 21:00 ` [Fastboot] " Vivek Goyal
2006-08-01 2:31 ` Eric W. Biederman
2006-08-01 2:34 ` H. Peter Anvin
2006-08-01 3:44 ` Eric W. Biederman
2006-08-01 4:25 ` Jan Kratochvil
2006-08-01 9:09 ` Eric W. Biederman [this message]
2006-08-01 9:43 ` Jan Kratochvil
2006-08-01 11:28 ` Eric W. Biederman
2006-08-04 21:08 ` Don Zickus
2006-08-04 21:25 ` Eric W. Biederman
2006-08-04 23:43 ` Don Zickus
2006-08-05 7:49 ` Eric W. Biederman
2006-08-05 16:07 ` Eric W. Biederman
2006-08-07 17:44 ` Don Zickus
2006-08-07 18:08 ` Eric W. Biederman
2006-08-07 23:57 ` Don Zickus
2006-08-08 5:01 ` Eric W. Biederman
2006-08-08 19:36 ` Don Zickus
2006-08-09 20:06 ` Don Zickus
2006-08-10 6:09 ` Eric W. Biederman
2006-08-10 13:13 ` Vivek Goyal
2006-08-10 17:05 ` Eric W. Biederman
2006-08-10 18:18 ` Vivek Goyal
2006-08-10 20:09 ` Eric W. Biederman
2006-08-11 21:25 ` Don Zickus
2006-08-12 7:20 ` Eric W. Biederman
2006-08-12 15:25 ` Don Zickus
2006-08-12 19:41 ` Eric W. Biederman
2006-08-13 20:06 ` Andi Kleen
2006-08-13 21:44 ` Eric W. Biederman
2006-08-14 16:51 ` [Fastboot] " Vivek Goyal
2006-08-14 17:04 ` H. Peter Anvin
2006-08-14 18:11 ` Vivek Goyal
2006-08-14 19:32 ` H. Peter Anvin
2006-08-14 19:42 ` Vivek Goyal
2006-08-14 19:45 ` H. Peter Anvin
2006-08-14 19:57 ` Vivek Goyal
2006-08-14 20:10 ` Eric W. Biederman
2006-08-14 20:59 ` Vivek Goyal
2006-08-14 21:15 ` Eric W. Biederman
2006-08-14 20:00 ` Eric W. Biederman
2006-08-08 23:36 ` Andi Kleen
2006-08-25 20:16 ` Vivek Goyal
[not found] <6EIOG-2xY-31@gated-at.bofh.it>
[not found] ` <6EIOG-2xY-33@gated-at.bofh.it>
[not found] ` <6EIOG-2xY-35@gated-at.bofh.it>
[not found] ` <6EIOG-2xY-37@gated-at.bofh.it>
[not found] ` <6EIOG-2xY-39@gated-at.bofh.it>
[not found] ` <6EIOG-2xY-19@gated-at.bofh.it>
[not found] ` <6Gf5M-2zt-23@gated-at.bofh.it>
[not found] ` <6Gfpt-30C-49@gated-at.bofh.it>
[not found] ` <6GhAA-6bP-19@gated-at.bofh.it>
[not found] ` <6Gx2C-436-5@gated-at.bofh.it>
[not found] ` <6HhoT-5E7-33@gated-at.bofh.it>
[not found] ` <6HhRQ-6uk-3@gated-at.bofh.it>
2006-08-09 12:40 ` [Fastboot] " Bodo Eggert
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=m1bqr43jqv.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=fastboot@osdl.org \
--cc=horms@verge.net.au \
--cc=hpa@zytor.com \
--cc=lace@jankratochvil.net \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=vgoyal@in.ibm.com \
/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
all inboxes | Powered by JetHome®