Re: [PATCH] mm: percpu: Add PCPU_FC_FIXED to pcpu_fc for settingfixed pcpu_atom_size.

From: Tejun Heo
Date: Fri Apr 27 2012 - 12:34:36 EST


Hello,

On Fri, Apr 27, 2012 at 09:09:24AM +0800, Yanmin Zhang wrote:
> > > We can't fix FC_PAGE power regression. If we do so, we need contact many
> > > hardware architects. Current kernel supports FC_PAGE and PMD_SIZE, why
> > > not to allow admin to choose other values?
> >
> > If this is something which is met in the field commonly, we need to
> > fix the default behavior rather than introducing some arcane boot
> > param.
>
> We just add a new value input method instead of introducing new parameter.

Ummm... I don't know what you meant by the above sentence but adding a
new magic kernel param whether it's part of an existing one or not, is
not a good solution. They're difficult to discover and not many
actually understand what they do. If you *have* to add some, then you
better make it clear where it's being applied for what. ie. in this
case, add something like x86_percpu_embed_unit_size.

> > IIRC, the reasons PMD_SIZE is used for atom_size are so that
> > percpu areas are aligned to PSE mapping, maybe later we can make use
> > of PSE mapping in vmalloc area too, and it didn't seem to hurt
> > anything.
>
> Well, vmalloc area might use different prot to map physical pages.
> So sharing one PMD huge page by many vmalloc areas might be not good.

Percpu allocator uses the whole vmalloc chunk, so there's no prot
problem. They're all percpu memory.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/