Re: Crash while mapping memory in pagetable_init() (Was: Re: .config)

H. Peter Anvin
2007-04-13T20:42:54Z

Jeremy Fitzhardinge wrote:
> H. Peter Anvin wrote:
>> I suggest, for clarity and to minimize bloat:
>
> I think it would save a page, at most. But OK. (Also, if you're
> running !PAE, these pages will actually become part of the init_mm
> pagetable, so there's no memory wastage at all.)

Even with PSE?

However, the main reason I wanted it done that way is to avoid cargo
cult programming; this makes it much clearer where the numbers actually
come from.

>> #ifdef CONFIG_X86_PAE
>> # define PAGE_TABLE_SIZE ((2048+4)*4096)
>> #else
>> # define PAGE_TABLE_SIZE ((1024+1)*4096)
>
> 1024 should be enough; the pgd is still swapper_pg_dir, and there are no
> pmds.

Check.

-hpa