Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread H. Peter Anvin
On 10/12/2012 06:55 AM, Yinghai Lu wrote: > On Thu, Oct 11, 2012 at 7:41 AM, Konrad Rzeszutek Wilk > wrote: >> On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: >>> >>> yes that is some extreme case: >>> assume that 2M range is [2T-2M, 2T), >> >> What is T in here? Terabyte? Is the '['

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread Yinghai Lu
On Thu, Oct 11, 2012 at 7:41 AM, Konrad Rzeszutek Wilk wrote: > On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: >> >> yes that is some extreme case: >> assume that 2M range is [2T-2M, 2T), > > What is T in here? Terabyte? Is the '[' vs ')' a significance in your > explanation? Should

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread Konrad Rzeszutek Wilk
On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: > On Wed, Oct 10, 2012 at 7:17 AM, Konrad Rzeszutek Wilk > wrote: > > On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: > > >> good point, i add one line comment to the revised patch. > >> > >> +/* need 3 4k for initial

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread Konrad Rzeszutek Wilk
On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: On Wed, Oct 10, 2012 at 7:17 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: good point, i add one line comment to the revised patch. +/* need 3 4k for initial

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread Yinghai Lu
On Thu, Oct 11, 2012 at 7:41 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: yes that is some extreme case: assume that 2M range is [2T-2M, 2T), What is T in here? Terabyte? Is the '[' vs ')' a significance in your explanation?

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-11 Thread H. Peter Anvin
On 10/12/2012 06:55 AM, Yinghai Lu wrote: On Thu, Oct 11, 2012 at 7:41 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: On Wed, Oct 10, 2012 at 08:49:05AM -0700, Yinghai Lu wrote: yes that is some extreme case: assume that 2M range is [2T-2M, 2T), What is T in here? Terabyte? Is the '['

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-10 Thread Yinghai Lu
On Wed, Oct 10, 2012 at 7:17 AM, Konrad Rzeszutek Wilk wrote: > On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: >> good point, i add one line comment to the revised patch. >> >> +/* need 3 4k for initial PMD_SIZE, 4k for 0-ISA_END_ADDRESS */ > > Can you explain the math please? It

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-10 Thread Konrad Rzeszutek Wilk
On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: > On Tue, Oct 9, 2012 at 9:01 AM, Konrad Rzeszutek Wilk > wrote: > >> +RESERVE_BRK(early_pgt_alloc, 16384); > > > > How did you come up with 16KB being the right size? What is this > > based on? Can you provide a comment explaining why

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-10 Thread Konrad Rzeszutek Wilk
On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: On Tue, Oct 9, 2012 at 9:01 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: +RESERVE_BRK(early_pgt_alloc, 16384); How did you come up with 16KB being the right size? What is this based on? Can you provide a comment

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-10 Thread Yinghai Lu
On Wed, Oct 10, 2012 at 7:17 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: On Tue, Oct 09, 2012 at 06:03:33PM -0700, Yinghai Lu wrote: good point, i add one line comment to the revised patch. +/* need 3 4k for initial PMD_SIZE, 4k for 0-ISA_END_ADDRESS */ Can you explain the math

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-09 Thread Yinghai Lu
On Tue, Oct 9, 2012 at 9:01 AM, Konrad Rzeszutek Wilk wrote: >> +RESERVE_BRK(early_pgt_alloc, 16384); > > How did you come up with 16KB being the right size? What is this > based on? Can you provide a comment explaining why 16KB is the > right value on 32-bit and 64-bit machines? good point, i

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-09 Thread Konrad Rzeszutek Wilk
On Mon, Oct 08, 2012 at 09:39:11PM -0700, Yinghai Lu wrote: > Get pgt_buf early from BRK, and use it to map page table at first. > > also use the left at first, then use new one. Left? > > -v2: extra xen call back for that new range. > -v3: fix compiling about #llx in print out that is reported

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-09 Thread Konrad Rzeszutek Wilk
On Mon, Oct 08, 2012 at 09:39:11PM -0700, Yinghai Lu wrote: Get pgt_buf early from BRK, and use it to map page table at first. also use the left at first, then use new one. Left? -v2: extra xen call back for that new range. -v3: fix compiling about #llx in print out that is reported by

Re: [PATCH 03/10] x86, mm: get early page table from BRK

2012-10-09 Thread Yinghai Lu
On Tue, Oct 9, 2012 at 9:01 AM, Konrad Rzeszutek Wilk kon...@kernel.org wrote: +RESERVE_BRK(early_pgt_alloc, 16384); How did you come up with 16KB being the right size? What is this based on? Can you provide a comment explaining why 16KB is the right value on 32-bit and 64-bit machines? good

[PATCH 03/10] x86, mm: get early page table from BRK

2012-10-08 Thread Yinghai Lu
Get pgt_buf early from BRK, and use it to map page table at first. also use the left at first, then use new one. -v2: extra xen call back for that new range. -v3: fix compiling about #llx in print out that is reported by Fengguang -v4: remove the early_pgt_buf_* stuff, because xen interface is

[PATCH 03/10] x86, mm: get early page table from BRK

2012-10-08 Thread Yinghai Lu
Get pgt_buf early from BRK, and use it to map page table at first. also use the left at first, then use new one. -v2: extra xen call back for that new range. -v3: fix compiling about #llx in print out that is reported by Fengguang -v4: remove the early_pgt_buf_* stuff, because xen interface is