Re: [PATCH] percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit

Tejun Heo
2012-04-27T17:27:37Z

On Fri, Apr 27, 2012 at 10:17:17AM -0700, H. Peter Anvin wrote:
> On 04/27/2012 09:53 AM, Tejun Heo wrote:
> >
> > + /*
> > + * If PSE is available, use PMD_SIZE for atom_size so that
> > + * embedded percpu areas are aligned to PMD. This, in the
> > + * future, can also allow using PMD mappings in vmalloc
> > + * area. Use PAGE_SIZE on 32bit as vmalloc space is highly
> > + * contended and large vmalloc area alloc can easily fail.
> > + */
> > + atom_size = PAGE_SIZE;
> > +#ifdef CONFIG_X86_64
> > + if (cpu_has_pse)
> > + atom_size = PMD_SIZE;
> > +#endif
>
> Just make it PAGE_SIZE on i386 and PMD_SIZE on x86-64; keep the behavior
> consistent. !cpu_has_pse on x86-64 is an abnormal situation (I think it
> applies to Xen, pretty much.)
>
> Other than that,
>
> Acked-by: H. Peter Anvin <hpa@zytor.com>

Yeah, that's simpler. Will update.

Thanks.

--
tejun