Re: [PATCH 0/6] Boot-time switching between 4- and 5-level paging for 4.15, Part 1

From: Kirill A. Shutemov
Date: Fri Oct 20 2017 - 08:18:14 EST


On Fri, Oct 20, 2017 at 02:49:13AM -0700, Minchan Kim wrote:
> Hi Ingo,
>
> On Fri, Oct 20, 2017 at 10:18:53AM +0200, Ingo Molnar wrote:
> >
> > * Kirill A. Shutemov <kirill@xxxxxxxxxxxxx> wrote:
> >
> > > On Tue, Oct 03, 2017 at 11:27:54AM +0300, Kirill A. Shutemov wrote:
> > > > On Fri, Sep 29, 2017 at 05:08:15PM +0300, Kirill A. Shutemov wrote:
> > > > > The first bunch of patches that prepare kernel to boot-time switching
> > > > > between paging modes.
> > > > >
> > > > > Please review and consider applying.
> > > >
> > > > Ping?
> > >
> > > Ingo, is there anything I can do to get review easier for you?
> >
> > Yeah, what is the conclusion on the sub-discussion of patch #2:
> >
> > [PATCH 2/6] mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS
> >
> > ... do we want to skip it entirely and use the other 5 patches?
>
> Sorry for the too much late reply, Kirill.
> Yes, you can skip it.
>
> As Nitin said in that patch's thread, zsmalloc has assumed
> PFN_BIT is (BITS_PER_LONG - PAGE_SHIFT) so it already covers
> X86_5LEVEL well, I think.
>
> In summary, there is no need to change it.
> I hope it helps to merge this patchset series.

Acctually, no, we need something.

The problem is that later in the series[1] we make MAX_PHYSMEM_BITS
dynamic. It's not a simple constant anymore.

But zsmalloc uses it to define _PFN_BIT, which, with few hoops, defines
ZS_SIZE_CLASSES. ZS_SIZE_CLASSES is used to specify size of a field in
'struct zs_pool' and build fails if it's not constant.

My patch addresses this, but there are more than one solution to the
problem.

Which way do you prefer to get it fixed?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git/commit/?h=la57/boot-switching/v8&id=57f669244fab9081a4343b59373ff43170ef328f

--
Kirill A. Shutemov