Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21161223ybl; Sun, 5 Jan 2020 22:04:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxS/gSwKO8/6HIZR6xzfa65mSTDpctcNwND6nRqMpx9WIRz4DToFVscEltLe/a2mqn5toWx X-Received: by 2002:a9d:7984:: with SMTP id h4mr116289456otm.297.1578290665690; Sun, 05 Jan 2020 22:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578290665; cv=none; d=google.com; s=arc-20160816; b=gCAPWbytAmB17BvuPD6NLklPDiDVGYtXrGuZLorsjQ9NEJZ6N5isPsgJX7486wjmJN MWKTfd/67v2wxpbT3pG2Y7URbHacCJiYePsU3OFEYvzkAymSZSzMHLxDqyyVuRZI+JoE RYT3V/wlXXn/9RLId6beovNDPY0kBaMgsqPXRZgF/Qo8E0jdrLnWVaHADBmz5pJ56ipE 2dJhRpOEvWUWT7VT7NFXlwG1WNNFt9GaJ7nZQY8UrtG41cvhG/i5CWxE6q3aFY+C1pLp PYcfNn5dm2FbvV6NjcSeJENN5xOut1CrbKlqwk+ZnQg8eDWQLHy5583l6JBNhdzR47lV fyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=q0fBQo317uuvB98blZTwTqrHTBdFawgMfAEM5RdNG98=; b=r95BrY8/w9co504dvVEla5DteHtfYHCQ3z1tMrYxxLcZZxIAcYf9DUDWvWRYJ2W9vL qXwPSnM5SILaU6iPtCphpMmEhUyCL3knqRhuoh3uIm7V8xW5okSyKb9QetH0h++QLGMx fb048snjs+6jWI1ZKUYmnhpqMXkpXAL4x5XeNHWXySUwUWPpnuyWQkicpe7Mf9/hdar2 s8F8EwO1945W1L+QHSoTfaMga/WC34PNWgv3rzx46Ti3OzHBW6RlHyHqwcjx9r1FYzP6 IHJaOuCT+RHDulo22o9cM/fc8SyehaeSitDXNvwHgXzVOVxmyk4TY8KJhFeF9L08/SNV j4zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LsnFF2ge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si36275082oto.169.2020.01.05.22.04.13; Sun, 05 Jan 2020 22:04:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LsnFF2ge; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726769AbgAFGCZ (ORCPT + 99 others); Mon, 6 Jan 2020 01:02:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:45778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgAFGCZ (ORCPT ); Mon, 6 Jan 2020 01:02:25 -0500 Received: from rapoport-lnx (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5EBE120848; Mon, 6 Jan 2020 06:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578290544; bh=zI7gBUNWlwkd3lFKva8XGnIwM1FVpFdgHUCAPBjSOs4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LsnFF2geI19fPlwyYS15EN2J122xcAAudU7qPjc8Yg8rj5+ulcbot7RHDI/0f0a4C CzKbNb50SqVOcIHiHpJY8bFWvC6xxVOQQiQTcEG7yINVvo5T+t1qoSg+qcErMRoY42 338+xYqXNsf3EA8fzviqqEB6MSOOfTBSjuQLpYEE= Date: Mon, 6 Jan 2020 08:02:18 +0200 From: Mike Rapoport To: Michael Ellerman Cc: Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCH] powerpc: add support for folded p4d page tables Message-ID: <20200106060217.GA5444@rapoport-lnx> References: <20191209150908.6207-1-rppt@kernel.org> <20200102081059.GA12063@rapoport-lnx> <87v9ppi7ky.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v9ppi7ky.fsf@mpe.ellerman.id.au> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 06, 2020 at 02:31:41PM +1100, Michael Ellerman wrote: > Mike Rapoport 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 > >> > >> 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 > >> --- > >> 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.