All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.ibm.com>,
	linux-mm@kvack.org, Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: add support for folded p4d page tables
Date: Mon, 6 Jan 2020 08:02:18 +0200	[thread overview]
Message-ID: <20200106060217.GA5444@rapoport-lnx> (raw)
In-Reply-To: <87v9ppi7ky.fsf@mpe.ellerman.id.au>

On Mon, Jan 06, 2020 at 02:31:41PM +1100, Michael Ellerman wrote:
> Mike Rapoport <rppt@kernel.org> writes:
> > Any updates on this?
> 
> It's very ... big, and kind of intrusive.

I've tried to split it to several smaller ones, but I couldn't find a way
to do it without breaking bisectability.

As for the intrusive, most of the changes are mechanical
 
> It's not an improvement as far as the powerpc code's readability is
> concerned. I assume the plan is that the 5-level hack can eventually be
> removed and so this conversion is a prerequisite for that?
 
Yep, the idea is to remove asm-generic/pgtable-nop4d-hack.h and
asm-generic/5level-fixup.h.

And, there is a small benefit for powerpc as kernel size is reduced a bit,
e.g. for pseries_defconfig:

$ size old/vmlinux new/vmlinux
   text	   data	    bss	    dec	    hex	filename
13702955	5961022	1517520	21181497	1433439  old/vmlinux
13702507	5961006	1517520	21181033	1433269  new/vmlinux

> cheers
> 
> > On Mon, Dec 09, 2019 at 05:09:08PM +0200, Mike Rapoport wrote:
> >> From: Mike Rapoport <rppt@linux.ibm.com>
> >> 
> >> Implement primitives necessary for the 4th level folding, add walks of p4d
> >> level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h.
> >> 
> >> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> >> ---
> >>  arch/powerpc/include/asm/book3s/32/pgtable.h  |  1 -
> >>  arch/powerpc/include/asm/book3s/64/hash.h     |  4 +-
> >>  arch/powerpc/include/asm/book3s/64/pgalloc.h  |  4 +-
> >>  arch/powerpc/include/asm/book3s/64/pgtable.h  | 58 ++++++++++--------
> >>  arch/powerpc/include/asm/book3s/64/radix.h    |  6 +-
> >>  arch/powerpc/include/asm/nohash/32/pgtable.h  |  1 -
> >>  arch/powerpc/include/asm/nohash/64/pgalloc.h  |  2 +-
> >>  .../include/asm/nohash/64/pgtable-4k.h        | 32 +++++-----
> >>  arch/powerpc/include/asm/nohash/64/pgtable.h  |  6 +-
> >>  arch/powerpc/include/asm/pgtable.h            |  8 +++
> >>  arch/powerpc/kvm/book3s_64_mmu_radix.c        | 59 ++++++++++++++++---
> >>  arch/powerpc/lib/code-patching.c              |  7 ++-
> >>  arch/powerpc/mm/book3s32/mmu.c                |  2 +-
> >>  arch/powerpc/mm/book3s32/tlb.c                |  4 +-
> >>  arch/powerpc/mm/book3s64/hash_pgtable.c       |  4 +-
> >>  arch/powerpc/mm/book3s64/radix_pgtable.c      | 19 ++++--
> >>  arch/powerpc/mm/book3s64/subpage_prot.c       |  6 +-
> >>  arch/powerpc/mm/hugetlbpage.c                 | 28 +++++----
> >>  arch/powerpc/mm/kasan/kasan_init_32.c         |  8 +--
> >>  arch/powerpc/mm/mem.c                         |  4 +-
> >>  arch/powerpc/mm/nohash/40x.c                  |  4 +-
> >>  arch/powerpc/mm/nohash/book3e_pgtable.c       | 15 +++--
> >>  arch/powerpc/mm/pgtable.c                     | 25 +++++++-
> >>  arch/powerpc/mm/pgtable_32.c                  | 28 +++++----
> >>  arch/powerpc/mm/pgtable_64.c                  | 10 ++--
> >>  arch/powerpc/mm/ptdump/hashpagetable.c        | 20 ++++++-
> >>  arch/powerpc/mm/ptdump/ptdump.c               | 22 ++++++-
> >>  arch/powerpc/xmon/xmon.c                      | 17 +++++-
> >>  28 files changed, 284 insertions(+), 120 deletions(-)
> 

-- 
Sincerely yours,
Mike.

WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.ibm.com>
Subject: Re: [PATCH] powerpc: add support for folded p4d page tables
Date: Mon, 6 Jan 2020 08:02:18 +0200	[thread overview]
Message-ID: <20200106060217.GA5444@rapoport-lnx> (raw)
In-Reply-To: <87v9ppi7ky.fsf@mpe.ellerman.id.au>

On Mon, Jan 06, 2020 at 02:31:41PM +1100, Michael Ellerman wrote:
> Mike Rapoport <rppt@kernel.org> writes:
> > Any updates on this?
> 
> It's very ... big, and kind of intrusive.

I've tried to split it to several smaller ones, but I couldn't find a way
to do it without breaking bisectability.

As for the intrusive, most of the changes are mechanical
 
> It's not an improvement as far as the powerpc code's readability is
> concerned. I assume the plan is that the 5-level hack can eventually be
> removed and so this conversion is a prerequisite for that?
 
Yep, the idea is to remove asm-generic/pgtable-nop4d-hack.h and
asm-generic/5level-fixup.h.

And, there is a small benefit for powerpc as kernel size is reduced a bit,
e.g. for pseries_defconfig:

$ size old/vmlinux new/vmlinux
   text	   data	    bss	    dec	    hex	filename
13702955	5961022	1517520	21181497	1433439  old/vmlinux
13702507	5961006	1517520	21181033	1433269  new/vmlinux

> cheers
> 
> > On Mon, Dec 09, 2019 at 05:09:08PM +0200, Mike Rapoport wrote:
> >> From: Mike Rapoport <rppt@linux.ibm.com>
> >> 
> >> Implement primitives necessary for the 4th level folding, add walks of p4d
> >> level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h.
> >> 
> >> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> >> ---
> >>  arch/powerpc/include/asm/book3s/32/pgtable.h  |  1 -
> >>  arch/powerpc/include/asm/book3s/64/hash.h     |  4 +-
> >>  arch/powerpc/include/asm/book3s/64/pgalloc.h  |  4 +-
> >>  arch/powerpc/include/asm/book3s/64/pgtable.h  | 58 ++++++++++--------
> >>  arch/powerpc/include/asm/book3s/64/radix.h    |  6 +-
> >>  arch/powerpc/include/asm/nohash/32/pgtable.h  |  1 -
> >>  arch/powerpc/include/asm/nohash/64/pgalloc.h  |  2 +-
> >>  .../include/asm/nohash/64/pgtable-4k.h        | 32 +++++-----
> >>  arch/powerpc/include/asm/nohash/64/pgtable.h  |  6 +-
> >>  arch/powerpc/include/asm/pgtable.h            |  8 +++
> >>  arch/powerpc/kvm/book3s_64_mmu_radix.c        | 59 ++++++++++++++++---
> >>  arch/powerpc/lib/code-patching.c              |  7 ++-
> >>  arch/powerpc/mm/book3s32/mmu.c                |  2 +-
> >>  arch/powerpc/mm/book3s32/tlb.c                |  4 +-
> >>  arch/powerpc/mm/book3s64/hash_pgtable.c       |  4 +-
> >>  arch/powerpc/mm/book3s64/radix_pgtable.c      | 19 ++++--
> >>  arch/powerpc/mm/book3s64/subpage_prot.c       |  6 +-
> >>  arch/powerpc/mm/hugetlbpage.c                 | 28 +++++----
> >>  arch/powerpc/mm/kasan/kasan_init_32.c         |  8 +--
> >>  arch/powerpc/mm/mem.c                         |  4 +-
> >>  arch/powerpc/mm/nohash/40x.c                  |  4 +-
> >>  arch/powerpc/mm/nohash/book3e_pgtable.c       | 15 +++--
> >>  arch/powerpc/mm/pgtable.c                     | 25 +++++++-
> >>  arch/powerpc/mm/pgtable_32.c                  | 28 +++++----
> >>  arch/powerpc/mm/pgtable_64.c                  | 10 ++--
> >>  arch/powerpc/mm/ptdump/hashpagetable.c        | 20 ++++++-
> >>  arch/powerpc/mm/ptdump/ptdump.c               | 22 ++++++-
> >>  arch/powerpc/xmon/xmon.c                      | 17 +++++-
> >>  28 files changed, 284 insertions(+), 120 deletions(-)
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2020-01-06  6:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 15:09 [PATCH] powerpc: add support for folded p4d page tables Mike Rapoport
2019-12-09 15:09 ` Mike Rapoport
2019-12-09 17:46 ` Christophe Leroy
2019-12-09 17:46   ` Christophe Leroy
2019-12-09 18:33   ` Matthew Wilcox
2019-12-09 18:33     ` Matthew Wilcox
2020-01-02  8:11 ` Mike Rapoport
2020-01-02  8:11   ` Mike Rapoport
2020-01-02 16:42   ` Christophe Leroy
2020-01-02 16:42     ` Christophe Leroy
2020-01-05  7:02     ` Mike Rapoport
2020-01-05  7:02       ` Mike Rapoport
2020-01-07 11:12       ` Christophe Leroy
2020-01-07 11:12         ` Christophe Leroy
2020-01-06  3:31   ` Michael Ellerman
2020-01-06  3:31     ` Michael Ellerman
2020-01-06  6:02     ` Mike Rapoport [this message]
2020-01-06  6:02       ` Mike Rapoport
2020-01-07  4:24       ` Michael Ellerman
2020-01-07  4:24         ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106060217.GA5444@rapoport-lnx \
    --to=rppt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=rppt@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.