Re: [PATCH] x86: mtrr cleanup for converting continuous to discrete layout v5

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Tuesday, April 29, 2008 - 12:00 pm

Yinghai Lu <yhlu.kernel.send@gmail.com> writes:


Skimming through the code it looks fairly sane.

I do think it would be good to split this patch into two pieces.
1) The mtrr rewriter/sanitizer/normalize.
   All it does it should do is rewrite the MTRRs with a
   semantically equivalent value.  This code should always be
   safe and work on any system with MTRRs.

   This works around otherwise sane bios's that simply prefer
   to have contiguous MTRRs.

   I don't see a reason why this code should be configurable.

   This approach avoids earlier concerns because it starts
   with the existing MTRR layout and not with the e820 map.

2) The mtrr_chunk_size code that rounds things off and allows
   us to use discrete MTRRs by reducing some RAM to uncacheable.
   Because it makes things uncacheable it has potentially bad
   side effects on performance and thus potentially bad side
   effects on functionality.  For areas like the SMM and ACPI
   especially as they usually occur at the end of RAM just
   below 4G.

   The chunk size code should be configurable and default to off
   because it has potential side effects.  A KConfig option may
   also be appropriate.  It asks an interesting trade off question
   do you want your BIOS to be fast or X.


Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] x86: mtrr cleanup for converting continuous to ..., Arjan van de Ven, (Sun Apr 27, 10:50 pm)
Re: [PATCH] x86: mtrr cleanup for converting continuous to ..., Eric W. Biederman, (Tue Apr 29, 12:00 pm)
Re: [PATCH] x86: mtrr cleanup for converting continuous to ..., Eric W. Biederman, (Tue Apr 29, 1:29 pm)
Re: [PATCH] x86: mtrr cleanup for converting continuous to ..., Eric W. Biederman, (Tue Apr 29, 3:14 pm)
Re: [PATCH] x86: mtrr cleanup for converting continuous to ..., Eric W. Biederman, (Tue Apr 29, 6:16 pm)