From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: linux-mm@kvack.org
Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Will Deacon <will@kernel.org>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [PATCH v3 0/5] elide extraneous generated code for folded p4d/pud/pmd
Date: Wed, 16 Oct 2019 09:23:55 -0700 [thread overview]
Message-ID: <20191016162400.14796-1-vgupta@synopsys.com> (raw)
Hi,
This series came out of seemingly benign excursion into understanding/removing
__ARCH_USE_5LEVEL_HACK from ARC port showing some extraneous code being
generated despite folded p4d/pud/pmd
| bloat-o-meter2 vmlinux-[AB]*
| add/remove: 0/0 grow/shrink: 3/0 up/down: 130/0 (130)
| function old new delta
| free_pgd_range 548 660 +112
| p4d_clear_bad 2 20 +18
The patches here address that
| bloat-o-meter2 vmlinux-[BF]*
| add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-386 (-386)
| function old new delta
| pud_clear_bad 20 - -20
| p4d_clear_bad 20 - -20
| free_pgd_range 660 314 -346
The code savings are not a whole lot, but still worthwhile IMHO.
Please review, test and apply. It seems to survive my usual battery of
multibench, hakcbench etc.
Thx,
-Vineet
---
Changes since v2 [3]
- No code changes: Fixed the silly typos and collected ACKs
Changes since v1 [1]
- Per Linus Sugestion remvoed the extra ifdey'ery (hence not
accumulating Kirill's ACks)
- Added the RFC patch for pmd_free_tlb() after discussions [2]
- Also throwing in the ARC patch which started this all (so we get the
full context of patchset) - I'm ok if this goes via mm tree, should
be non contentious and can drop this too if Andrew thinks otherwise
[1] http://lists.infradead.org/pipermail/linux-snps-arc/2019-October/006263.html
[2] http://lists.infradead.org/pipermail/linux-snps-arc/2019-October/006277.html
[3] http://lists.infradead.org/pipermail/linux-snps-arc/2019-October/006307.html
---
Vineet Gupta (5):
ARC: mm: remove __ARCH_USE_5LEVEL_HACK
asm-generic/tlb: stub out pud_free_tlb() if nopud ...
asm-generic/tlb: stub out p4d_free_tlb() if nop4d ...
asm-generic/tlb: stub out pmd_free_tlb() if nopmd
asm-generic/mm: stub out p{4,u}d_clear_bad() if
__PAGETABLE_P{4,u}D_FOLDED
arch/arc/include/asm/pgtable.h | 1 -
arch/arc/mm/fault.c | 10 ++++++++--
arch/arc/mm/highmem.c | 4 +++-
include/asm-generic/4level-fixup.h | 1 -
include/asm-generic/5level-fixup.h | 1 -
include/asm-generic/pgtable-nop4d.h | 2 +-
include/asm-generic/pgtable-nopmd.h | 2 +-
include/asm-generic/pgtable-nopud.h | 2 +-
include/asm-generic/pgtable.h | 11 +++++++++++
include/asm-generic/tlb.h | 4 ----
mm/pgtable-generic.c | 9 +++++++++
11 files changed, 34 insertions(+), 13 deletions(-)
--
2.20.1
next reply other threads:[~2019-10-16 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 16:23 Vineet Gupta [this message]
2019-10-16 16:23 ` [PATCH v3 1/5] ARC: mm: remove __ARCH_USE_5LEVEL_HACK Vineet Gupta
2019-10-16 16:23 ` [PATCH v3 2/5] asm-generic/tlb: stub out pud_free_tlb() if nopud Vineet Gupta
2019-10-16 16:23 ` [PATCH v3 3/5] asm-generic/tlb: stub out p4d_free_tlb() if nop4d Vineet Gupta
2019-10-16 16:23 ` [PATCH v3 4/5] asm-generic/tlb: stub out pmd_free_tlb() if nopmd Vineet Gupta
2019-10-16 16:24 ` [PATCH v3 5/5] asm-generic/mm: stub out p{4,u}d_clear_bad() if __PAGETABLE_P{4,U}D_FOLDED Vineet Gupta
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=20191016162400.14796-1-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).