[Bug Fix]: Do 32-bit table calculations in pre-processor

[Bug Fix]: Do 32-bit table calculations in pre-processor

Post by Yinghai L » Sun, 05 Jul 2009 05:10:09



>> + PAGE_TABLE_<<ZE((1<<20) - (__PAGE_>>FSET >> PAGE_S<<FT)) << PAGE_>>IF>> >>
>> Worst-case size of the kernel mapping we need t>>ma>>:
>>
>>>= >>=
>>
>> >>fo>>:
>>
>> 5 [0000010000 - 0000011000] gt;GTABLE ==> [0000010000 ->>000011000]
>> 6 [0000011000 - 0000015000] > OOTMAP ==> [0000011>>0 >>000001500>>
>> After:
>>
>> 5 [0000010000 - 000007d>00] GTABLE ==> [00>>010000 - 000007d000]
>> 6 [000007d000 - 00>0081000] OOTMAP ==>>[0>00>7d000 - 0000081000]
>>
>
> that PGTABLE is from early resource. and it is fill>d >y init_memory_mapping()
>
> it mean preallocated pgtable to MAPPING_BE>OND_END is small now after
> patch. and init_memo>y_>apping try to get more.
>
> please send out whole dmesg. with and w>thout your patch. it could
> print out initial mapped before e820 alloc>tion is involved for 32bit
> rintk(KERN_DEBUG "initial>memory mapped : 0 - %08lx\n",
> <<> gt;> ax_pfn_mapped< >
>
> your patch should be righ>. except t>>change that 12 to PAGE_SHIFT
>
mean

>> /* Enough space to fit pa>>tables for the low memory >>near map */
>> MAPPING_BEYOND_END =<<
>> - >>AGE_TABLE_SIZE(((1<<32<<- __>>GE_OFFSET) >> PAGE_SHIFT) << PAGE_SH<<T
>> + PAGE_TABLE_SI>>((1<<(32 - PAGE_S<<FT)) - (__PAGE_OFFSET >> PAGE_SHIFT)) << PAGE_SHIFT

YH
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[Bug Fix]: Do 32-bit table calculations in pre-processor

Post by Yinghai L » Sun, 05 Jul 2009 05:10:12


> + PAGE_TABLE_<<ZE((1<<20) - (__PAGE_>>FSET >> PAGE_S<<FT)) << PAGE_>HI>T
> >> *
> Worst-case size of the kernel mapping we need t> m>ke:
>
>
> >ef>re:
>
> 5 [0000010000 - 0000011000] gt;GTABLE ==> [0000010000 ->0000011000]
> 6 [0000011000 - 0000015000] > OOTMAP ==> [0000011>00>- 0000015>00>
>
> After:
>
> 5 [0000010000 - 000007d>00] GTABLE ==> [00>0010000 - 000007d000]
> 6 [000007d000 - 00>0081000] OOTMAP ==> [000007d000 - 0000081000]
>

that PGTABLE is from early resource. and it is filled by init_memory_mapping()

it mean preallocated pgtable to MAPPING_BEYOND_END is small now after
patch. and init_memory_mapping try to get more.

please send out whole dmesg. with and without your patch. it could
print out initial mapped before e820 allocation is involved for 32bit
printk(KERN_DEBUG "initial memory mapped : 0 - %08lx\n",
<< max_pfn_mapped<

your patch should be right. except to change that 12 to PAGE_SHIFT

YH
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

 
 
 

[Bug Fix]: Do 32-bit table calculations in pre-processor

Post by Michael S. » Sun, 05 Jul 2009 05:50:06


> >>>>/*
> >> Worst-case size of the kernel mapping we need t> >>ke> >> >>
> >> >>= > >> >>
> >> >e>>re> >> >>
> >> 5 [0000010000 - 0000011000] gt;GTABLE ==> [0000010000 ->0>>0011000]
> >> 6 [0000011000 - 0000015000] > OOTMAP ==> [0000011>0>>- >0>>015000]
> >>
> >> 5 [0000010000 - 000007d>00] GTABLE ==> [00>0>>0000 - 000007d000]
> >> 6 [000007d000 - 00>0081000] OOTMAP ==> >>00>0>d0>0>- 0000081000]
> >>
> >
> > that PGTABLE is from early resource. and it is fill>d>by>i>it_memory_mapping()
> >
> > it mean preallocated pgtable to MAPPING_BE>O>D_END is small now after
> > patch. and init_memo>y>ma>p>ng try to get more.
> >
> > please send out whole dmesg. with and w>t>out your patch. it could
> > print out initial mapped before e820 alloc>t>on is involved for 32bit
> > rintk(KERN_DEBUG "initial>m>mory mapped : 0 - %08lx\n",
> > > &g<< gt;gt;> >max_pfn_mapped< > >
> >
> > your patch should be righ>.>ex>ept to >hange that 12 to PAGE_SHIFT
> >
> mean
>

Yes, want to>get>t>> 8K page machines correct also.

>
> >> /* Enough space to fit pa>e>>bles for the low memory li>e>> map */
> >> MAPPING_BEYOND_END = \
<<>> - >>AGE_TABLE_SIZE(((1<<32) - _<<gt;A>>_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT << >> + PAGE_TABLE_SI>>((1<<(32 - PAGE_SHIFT)<<- (__>AGE_OFFSET >> PAGE_SHIFT)) << PAGE_SHIFT> >
> You >ead my mind, thanks.

Mike
> YH
> --
> To unsubscribe from this list: se>d the line "unsubscribe linux-kernel" in
> the body >f a message to XXXX@XXXXX.COM
> More majordomo info at h>tp://vger.kernel.org/majordomo-info.html
> Please >ead>the FAQ at http://www.yqcomputer.com/
>
>


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[Bug Fix]: Do 32-bit table calculations in pre-processor

Post by Michael S. » Sun, 05 Jul 2009 05:50:10


> > * Enough space to fit pagetables for the low memory linear map */ >>>> APPING_BEYOND_END = \ >>>> - PAGE_TABLE_SIZE<<(1<<32) - __PAGE_OFFS>>) >> PAGE_SHI<<) << PAGE_SHI>T> > > + PAGE_TABLE_<<ZE((1<<20) - (__PAGE_>>FSET >> PAGE_S<<FT)) << PAGE_>H>FT> > >
>>>>*
> > Worst-case size of the kernel mapping we need t> >ak>:> > >
> > > =>=> > >
> > >e>or>:> > >
> > 5 [0000010000 - 0000011000] gt;GTABLE ==> [0000010000 ->0>00011000]
> > 6 [0000011000 - 0000015000] > OOTMAP ==> [0000011>0> ->0>00015000]> > >> > > After:
> >
> > 5 [0000010000 - 000007d>00] GTABLE ==> [00>0>10000 - 000007d000]
> > 6 [000007d000 - 00>0081000] OOTMAP ==> >00>007>000 - 0000081000]
> >
>
> that PGTABLE is from early resource. and it is fill>d b> init_memory_mapping()
>
> it mean preallocated pgtable to MAPPING_BE>OND_END is small now after
> patch. and init_memo>y_mapping try to get more.
>

Ah, so - the labels are a bit misleading>- but that makes since.

> please send out whole dmesg. with and w>thout your patch. it could
>

Am having technical problems at the moment - maybe later today I
can get you >he information you need.

> print out initial mapped before e820 alloc>tion is involved for 32bit
> printk(KERN_DEBUG "initial me>ory mapped : 0 - %08lx\n",
> <<m>x_p>n_>app>d< >
>
>
> your patch should be right. except to c>ange that 12 to PAGE_SHIFT
>

Not all pages are 4K, but as you poin> out,>tha> can be fixed.

> YH
>
>

Mike
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/