From patchwork Wed Oct 9 22:26:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 11182291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8324D14DB for ; Wed, 9 Oct 2019 22:27:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 46D94206BB for ; Wed, 9 Oct 2019 22:27:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="blyN6FOQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46D94206BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DAF846B0003; Wed, 9 Oct 2019 18:27:10 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id CCAB06B0005; Wed, 9 Oct 2019 18:27:10 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B40938E0003; Wed, 9 Oct 2019 18:27:10 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0229.hostedemail.com [216.40.44.229]) by kanga.kvack.org (Postfix) with ESMTP id 887B06B0005 for ; Wed, 9 Oct 2019 18:27:10 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 1C3C4612B for ; Wed, 9 Oct 2019 22:27:10 +0000 (UTC) X-FDA: 76025683020.11.base95_43ef9b44da15 X-Spam-Summary: 2,0,0,6fee0a8ca69b8763,d41d8cd98f00b204,vineet.gupta1@synopsys.com,::linux-snps-arc@lists.infradead.org:linux-kernel@vger.kernel.org:linux-arch@vger.kernel.org:arnd@arndb.de:will@kernel.org:aneesh.kumar@linux.ibm.com:akpm@linux-foundation.org:npiggin@gmail.com:peterz@infradead.org:kirill.shutemov@linux.intel.com:vineet.gupta1@synopsys.com,RULES_HIT:41:355:379:541:966:968:988:989:1260:1261:1311:1314:1345:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:1981:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:4184:4250:4321:4385:4605:5007:6119:6261:6653:6742:7208:7903:9113:9121:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12679:12895:13069:13161:13229:13311:13357:13894:14096:14180:14384:14394:14581:14721:21060:21080:21451:21611:21627:30012:30054,0,RBL:198.182.61.142:@synopsys.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSB L:neutra X-HE-Tag: base95_43ef9b44da15 X-Filterd-Recvd-Size: 3268 Received: from smtprelay-out1.synopsys.com (dc2-smtprelay2.synopsys.com [198.182.61.142]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Oct 2019 22:27:09 +0000 (UTC) Received: from mailhost.synopsys.com (dc8-mailhost1.synopsys.com [10.13.135.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 20F71C0161; Wed, 9 Oct 2019 22:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1570660027; bh=6Aq+CRKQ123HNwQJOwDjxHCXrqx0gY8ewNZL7wsZSIE=; h=From:To:Cc:Subject:Date:From; b=blyN6FOQZeulLD0rf1SvXjIM81rGAzdstFNamvGPsaElojyMMbzaqYVTCZj9ydVaI 98ChzD8+Zzd9r82lUCkcUZ0ow0H9UDFTURRj24tyNIEt0x1laSOmwqXhtzXsovPU4f ZG7hvAT/GsDUNNbnWqvCcRLa/tNcmyAP7TqHMoG34jSYE4g9/0aCA9CSfpYq/auC9V bjivnGSy4eHHx9kIoq5WETVy1zXayxj9iDSOMc/jfoDsftL/Aj43lciQgdrgZDxb9Z kMchGMJj1ztHCMXyEQccdFLNG8OUrAYat7gFNAuFwU+S5jF7Dzu6W6+AvVW9IOojR/ Oc73ruBIiQR/w== Received: from vineetg-Latitude-E7450.internal.synopsys.com (vineetg-latitude-e7450.internal.synopsys.com [10.10.161.61]) by mailhost.synopsys.com (Postfix) with ESMTP id 22EC0A006B; Wed, 9 Oct 2019 22:27:03 +0000 (UTC) From: Vineet Gupta To: linux-mm@kvack.org Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Arnd Bergmann , Will Deacon , "Aneesh Kumar K . V" , Andrew Morton , Nick Piggin , Peter Zijlstra , "Kirill A . Shutemov" , Vineet Gupta Subject: [PATCH 0/3] eldie generated code for folded p4d/pud Date: Wed, 9 Oct 2019 15:26:55 -0700 Message-Id: <20191009222658.961-1-vgupta@synopsys.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, This series elides extraneous generate code for folded p4d/pud. This came up when trying to remove __ARCH_USE_5LEVEL_HACK from ARC port. The code saving are not a while lot, but still worthwhile IMHO. bloat-o-meter2 vmlinux-A-baseline vmlinux-E-elide-p?d_clear_bad add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-146 (-146) function old new delta p4d_clear_bad 2 - -2 pud_clear_bad 20 - -20 free_pgd_range 546 422 -124 Total: Before=4137148, After=4137002, chg -1.000000% Thx, -Vineet Vineet Gupta (3): asm-generic/tlb: stub out pud_free_tlb() if __PAGETABLE_PUD_FOLDED ... asm-generic/tlb: stub out p4d_free_tlb() if __PAGETABLE_P4D_FOLDED ... asm-generic/mm: stub out p{4,d}d_clear_bad() if __PAGETABLE_P{4,u}D_FOLDED include/asm-generic/4level-fixup.h | 2 -- include/asm-generic/5level-fixup.h | 2 -- include/asm-generic/pgtable.h | 11 +++++++++++ include/asm-generic/tlb.h | 8 ++++++-- mm/pgtable-generic.c | 4 ++++ 5 files changed, 21 insertions(+), 6 deletions(-) Acked-by: Kirill A. Shutemov