Messages in this thread | | | Date | Mon, 28 Apr 2008 20:01:48 -0700 | From | "Yinghai Lu" <> | Subject | Re: [PATCH] x86: mtrr cleanup for converting continuous to discrete layout v5 |
| |
On Mon, Apr 28, 2008 at 7:42 PM, Andrew Morton <akpm@linux-foundation.org> wrote: > On Mon, 28 Apr 2008 15:05:05 -0700 Yinghai Lu <yhlu.kernel.send@gmail.com> wrote: > > > > > some BIOS like to use continus MTRR layout, and may X driver can not add > > WB entries for graphical cards when 4g or more RAM installed. > > > > the patch will change MTRR to discrete. > > > > mtrr_chunk_size= could be used to have smaller continuous block to hold holes. > > default is 256m, could be set according to size of graphics card memory. > > > > v2: fix -1 for UC checking > > v3: default to disable, and need use enable_mtrr_cleanup to enable this feature > > skip the var state change warning. > > remove next_basek in range_to_mtrr() > > v4: correct warning mask. > > v5: CONFIG_MTRR_SANITIZER > > > > Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> > > > > +#ifdef CONFIG_MTRR_SANITIZER > > + > > +#ifdef CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT > > I don't think these newly-added config items should exist, sorry. But > then, the changelog does't describe _why_ they exist (it should!) and I > probably missed it in the discusson. > > Anyone who distributes a kernel will need to enable both > CONFIG_MTRR_SANITIZER and CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT, so the > config items are only useful for saving a bit of kernel text in custom > kernel builds. > > > > +static int enable_mtrr_cleanup __initdata = 1; > > +#else > > +static int enable_mtrr_cleanup __initdata; > > The disable_mtrr_cleanup and enable_mtrr_cleanup boot options are also > problematic. We really really want this stuff to all happen automatically. > > What happens with this sort of thing is that people's machines misbehave > and I expect most of them never find out about the magic option. They > give up on Linux or use a different computer or use a different distro > which happened to set the option the other way, etc, etc. Some people will > think to do a bit of googling and might stumble across the option after a > while. > > It's all rather user-unfriendly and we should try really hard to just make > things work. Is this at all possible?
Eric or Andi said it is too risky to touch mtrr.
> > > Anyway. I think the problem which you have identified is solveable in > userspace, isn't it? Read the existing mtrr settings and rewrite them in a > better form? If so, we could prepare a little program which does that and > make the X people and distributors aware of it. This has the significant > advantage that it will fix pre-2.6.26 kernels too.
sounds good.
YH
| |