[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1mybpt5t8.fsf@fess.ebiederm.org>
Date: Fri, 13 Mar 2009 15:29:39 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Yinghai Lu <yinghai@...nel.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: relocs is only used with 32bit
"H. Peter Anvin" <hpa@...or.com> writes:
> Hi Yinghai,
>
> In general I prefer minimizing the conditional sections rather than
> maximizing them. If nothing else, it catches errors earlier that way,
> and makes it easier to eventually eliminate them entirely.
Makes sense. Although in this case that rule appears like it
can't even execute on x86_64.
The architectural differences result in different tradeoffs so the
relocation design is completely different on x86_64 and x86_32.
On x86_64 we just change the underlying page tables to point
at different physical addresses and have a fixed virtual address.
Since x86_64 is best with short (< 2GB) offsets that is a fairly
optimal.
On x86_32 where address space is precious and it doesn't really
matter where the kernel lives we take a 5% or so size penalty
to hold relocations in the binary and update the kernel at boot
time so everything assumes we run at the loaded address.
With the result that we need a link time helper on x86_32 and
not on x86_64.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists