Re: x86/mm: Limit 2/4M size calculation to x86_32

From: Avi Kivity
Date: Wed Jul 25 2012 - 09:41:03 EST


On 07/25/2012 04:24 PM, Stefan Bader wrote:
>>> ...
>>> ifdef CONFIG_X86_32
>>> /*
>>> * Don't use a large page for the first 2/4MB of memory
>>> * because there are often fixed size MTRRs in there
>>> * and overlapping MTRRs into large pages can cause
>>> * slowdowns.
>>> */
>>>
>>
>> That's equally true for X86_64.
>>
>> Best would be to merge the MTRRs into PAT, but that might not work for SMM.
>>
>>
> Ok, true. Not sure why this was restricted to 32bit when reconsidering. Except
> if in 64bit it was assumed (or asserted) that the regions are aligned to 2M...
> But maybe this can be answered by someone knowing the details. I would not mind
> either way (have the first range with 4K pages in all cases or fixing the
> additional PTE allocation). Just as it is now it is inconsistent.

Sometimes CONFIG_X86_32 is used as an alias for "machines so old they
don't support x86_64". As a 32-bit kernel can be run on a machine that
does support x86_64, it should be replaced by a runtime test for
X86_FEATURE_LM, until a more accurate test can be found.

--
error compiling committee.c: too many arguments to function


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/