Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-08 Thread Xunlei Pang
On 05/08/2017 at 02:29 PM, Ingo Molnar wrote: > * Xunlei Pang wrote: > >> On 05/05/2017 at 05:20 PM, Ingo Molnar wrote: >>> * Xunlei Pang wrote: >>> On 05/05/2017 at 02:52 PM, Ingo Molnar wrote: > * Xunlei Pang wrote: > >> @@ -122,6 +122,10 @@ static int init_pgtable(struct kima

Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-07 Thread Ingo Molnar
* Xunlei Pang wrote: > On 05/05/2017 at 05:20 PM, Ingo Molnar wrote: > > * Xunlei Pang wrote: > > > >> On 05/05/2017 at 02:52 PM, Ingo Molnar wrote: > >>> * Xunlei Pang wrote: > >>> > @@ -122,6 +122,10 @@ static int init_pgtable(struct kimage *image, > unsigned long start_pgtable) >

Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-05 Thread Xunlei Pang
On 05/05/2017 at 05:20 PM, Ingo Molnar wrote: > * Xunlei Pang wrote: > >> On 05/05/2017 at 02:52 PM, Ingo Molnar wrote: >>> * Xunlei Pang wrote: >>> @@ -122,6 +122,10 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable) level4p = (pgd_t *)__va(st

Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-05 Thread Ingo Molnar
* Xunlei Pang wrote: > On 05/05/2017 at 02:52 PM, Ingo Molnar wrote: > > * Xunlei Pang wrote: > > > >> @@ -122,6 +122,10 @@ static int init_pgtable(struct kimage *image, > >> unsigned long start_pgtable) > >> > >>level4p = (pgd_t *)__va(start_pgtable); > >>clear_page(level4p); > >> +

Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-05 Thread Xunlei Pang
On 05/05/2017 at 02:52 PM, Ingo Molnar wrote: > * Xunlei Pang wrote: > >> @@ -122,6 +122,10 @@ static int init_pgtable(struct kimage *image, unsigned >> long start_pgtable) >> >> level4p = (pgd_t *)__va(start_pgtable); >> clear_page(level4p); >> + >> +if (direct_gbpages) >> +

Re: [PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-04 Thread Ingo Molnar
* Xunlei Pang wrote: > @@ -122,6 +122,10 @@ static int init_pgtable(struct kimage *image, unsigned > long start_pgtable) > > level4p = (pgd_t *)__va(start_pgtable); > clear_page(level4p); > + > + if (direct_gbpages) > + info.direct_gbpages = true; No, this should

[PATCH v3 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-05-03 Thread Xunlei Pang
Kexec setups all identity mappings before booting into the new kernel, and this will cause extra memory consumption for paging structures which is quite considerable on modern machines with huge number of memory. E.g. On one 32TB machine, in kdump case, it could waste around 128MB (around 4MB/TB)