[Lguest] lguest: mapping switcher would thwack fixmap

Paul Bolle pebolle at tiscali.nl
Thu Apr 11 17:29:45 EST 2013


On Thu, 2013-04-11 at 13:14 +0930, Rusty Russell wrote:
> Paul Bolle <pebolle at tiscali.nl> writes:
> > 1) I'm not enitrely sure what the fixmap is, but dmesg tells me:
> >     kernel: [    0.000000]     fixmap  : 0xffa95000 - 0xfffff000   (5544 kB)
> 
> Wow, you too... how many cpus do you have?

This is on a laptop from (I think) 2006: one CPU, one core, rather basic
(to 2013 eyes).

> Looks like NR_CPUS is huge, leading to a massive fixmap.

I'm using the default configuration used by Fedora 17. It uses
    CONFIG_X86_BIGSMP=y

in its configuration for 32 bit X86. That gives NR_CPUS=32:
    config NR_CPUS
            int "Maximum number of CPUs" if SMP && !MAXSMP
            range 2 8 if SMP && X86_32 && !X86_BIGSMP
            range 2 512 if SMP && !MAXSMP
            [...]
            default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000)
            [...]

(Fedora 18 and later should be the same.) I haven't yet done the math
(and the code grep) to see if 32 could explain the fixmap.

> > 4) Any idea what could be going on? And any suggestion to fix this?
> 
> Well, we only map the top switcher PGD entry, we need to change that to
> a loop.  It's kind of assumed by the page table code:
> 
> /*
>  * The Switcher uses the complete top PTE page.  That's 1024 PTE entries (4MB)
>  * or 512 PTE entries with PAE (2MB).
>  */

(Just to be clear: this is not on an PAE system.)

> #define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
> 
> We should be able to modify that with some careful work.  I'll see what
> I can do...

Feel free to ask me to test stuff. I can even debug this laptop with an
actual serial line (that may not be needed but is great fun, so any
reason to do it is always welcome). There's little of value on its disk,
so I'm pretty careless with testing stuff.


Paul Bolle



More information about the Lguest mailing list