From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id 1B9DD6B02E3 for ; Fri, 26 Oct 2018 04:52:51 -0400 (EDT) Received: by mail-wr1-f72.google.com with SMTP id f7-v6so337138wrs.1 for ; Fri, 26 Oct 2018 01:52:51 -0700 (PDT) Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id b11-v6si1393012wmc.144.2018.10.26.01.52.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 01:52:49 -0700 (PDT) Date: Fri, 26 Oct 2018 10:52:02 +0200 From: Peter Zijlstra Subject: Re: [PATCH 1/4] treewide: remove unused address argument from pte_alloc functions (v2) Message-ID: <20181026085202.GC3109@worktop.c.hoisthospitality.com> References: <20181013013200.206928-1-joel@joelfernandes.org> <20181013013200.206928-2-joel@joelfernandes.org> <20181024083716.GN3109@worktop.c.hoisthospitality.com> <20181025022119.GC13560@joelaf.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181025022119.GC13560@joelaf.mtv.corp.google.com> Sender: owner-linux-mm@kvack.org List-ID: To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, "Kirill A . Shutemov" , Michal Hocko , Julia Lawall , akpm@linux-foundation.org, Andrey Ryabinin , Andy Lutomirski , anton.ivanov@kot-begemot.co.uk, Borislav Petkov , Catalin Marinas , Chris Zankel , dancol@google.com, Dave Hansen , "David S. Miller" , elfring@users.sourceforge.net, Fenghua Yu , Geert Uytterhoeven , Guan Xuetao , Helge Deller , hughd@google.com, Ingo Molnar , "James E.J. Bottomley" , Jeff Dike , Jonas Bonn , kasan-dev@googlegroups.com, kvmarm@lists.cs.columbia.edu, Ley Foon Tan , linux-alpha@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, lokeshgidra@google.com, Max Filippov , minchan@kernel.org, nios2-dev@lists.rocketboards.org, pantin@google.com, Richard Weinberger , Rich Felker , Sam Creasey , sparclinux@vger.kernel.org, Stafford Horne , Stefan Kristiansson , Thomas Gleixner , Tony Luck , Will Deacon , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Yoshinori Sato On Wed, Oct 24, 2018 at 07:21:19PM -0700, Joel Fernandes wrote: > On Wed, Oct 24, 2018 at 10:37:16AM +0200, Peter Zijlstra wrote: > > On Fri, Oct 12, 2018 at 06:31:57PM -0700, Joel Fernandes (Google) wrote: > > > This series speeds up mremap(2) syscall by copying page tables at the > > > PMD level even for non-THP systems. There is concern that the extra > > > 'address' argument that mremap passes to pte_alloc may do something > > > subtle architecture related in the future that may make the scheme not > > > work. Also we find that there is no point in passing the 'address' to > > > pte_alloc since its unused. So this patch therefore removes this > > > argument tree-wide resulting in a nice negative diff as well. Also > > > ensuring along the way that the enabled architectures do not do anything > > > funky with 'address' argument that goes unnoticed by the optimization. > > > > Did you happen to look at the history of where that address argument > > came from? -- just being curious here. ISTR something vague about > > architectures having different paging structure for different memory > > ranges. > > I didn't happen to do that analysis but from code analysis, no architecutre > is using it. Since its unused in the kernel, may be such architectures don't > exist or were removed, so we don't need to bother? Could you share more about > your concern with the removal of this argument? No concerns at all with removing it; I was purely curious as to the origin of the unused argument. Kirill provided that answer.