Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-04 Thread Toshi Kani
On Wed, 2015-03-04 at 21:17 +0100, Ingo Molnar wrote: > * Toshi Kani wrote: > > > On Wed, 2015-03-04 at 01:00 +, Andrew Morton wrote: > > > On Tue, 03 Mar 2015 16:14:32 -0700 Toshi Kani wrote: > > > > > > > On Tue, 2015-03-03 at 14:44 -0800, Andrew Morton wrote: > > > > > On Tue, 3 Mar 201

Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-04 Thread Ingo Molnar
* Toshi Kani wrote: > On Wed, 2015-03-04 at 01:00 +, Andrew Morton wrote: > > On Tue, 03 Mar 2015 16:14:32 -0700 Toshi Kani wrote: > > > > > On Tue, 2015-03-03 at 14:44 -0800, Andrew Morton wrote: > > > > On Tue, 3 Mar 2015 10:44:24 -0700 Toshi Kani wrote: > > > : > > > > > + > > > > >

Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-04 Thread Toshi Kani
On Wed, 2015-03-04 at 01:00 +, Andrew Morton wrote: > On Tue, 03 Mar 2015 16:14:32 -0700 Toshi Kani wrote: > > > On Tue, 2015-03-03 at 14:44 -0800, Andrew Morton wrote: > > > On Tue, 3 Mar 2015 10:44:24 -0700 Toshi Kani wrote: > > : > > > > + > > > > +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP > >

Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-03 Thread Andrew Morton
On Tue, 03 Mar 2015 16:14:32 -0700 Toshi Kani wrote: > On Tue, 2015-03-03 at 14:44 -0800, Andrew Morton wrote: > > On Tue, 3 Mar 2015 10:44:24 -0700 Toshi Kani wrote: > : > > > + > > > +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP > > > +int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot) > > >

Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-03 Thread Toshi Kani
On Tue, 2015-03-03 at 14:44 -0800, Andrew Morton wrote: > On Tue, 3 Mar 2015 10:44:24 -0700 Toshi Kani wrote: : > > + > > +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP > > +int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot) > > +{ > > + u8 mtrr; > > + > > + /* > > +* Do not use a huge pa

Re: [PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-03 Thread Andrew Morton
On Tue, 3 Mar 2015 10:44:24 -0700 Toshi Kani wrote: > This patch implements huge KVA mapping interfaces on x86. > > On x86, MTRRs can override PAT memory types with a 4KB granularity. > When using a huge page, MTRRs can override the memory type of the > huge page, which may lead a performance p

[PATCH v3 6/6] x86, mm: Support huge KVA mappings on x86

2015-03-03 Thread Toshi Kani
This patch implements huge KVA mapping interfaces on x86. On x86, MTRRs can override PAT memory types with a 4KB granularity. When using a huge page, MTRRs can override the memory type of the huge page, which may lead a performance penalty. The processor can also behave in an undefined manner if