Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1579637imm; Wed, 10 Oct 2018 17:51:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61I957j53A72GYtYWobAm+5AcZhyXH2JdOuo1bjRk47lv6G2l7xhOUas/OaGJw8OLIlOFvQ X-Received: by 2002:a17:902:bf43:: with SMTP id u3-v6mr1516734pls.212.1539219088027; Wed, 10 Oct 2018 17:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539219087; cv=none; d=google.com; s=arc-20160816; b=PSWRpU2rLW+nYXmDFXWmOmyrK2N4pKvzwkEz/bqpCeI4zQ8avwrn0EqkW20oUOGABk T+sblyuUd/zGmRNaty+N7tIwdYJ6SqFrtS9zLpLTmQ9g9++XTZ9Y7vjZRT9J0T+I/GRW jHG7AZW/wFE/b2CJKRfKmQ2bJ7JJFCTC1fz/JHvKRcgqJWTu66ufHkez2EyupauwzkGQ wV2TKc/BeFZgzgHej6ri9O7iGAZXx8VBLRN5YFgP1PnaeH2Q9jw3u3OYn1CBn2icTKaT /uLfvQP7Qe2OR4LsRIYs5Big+gmchDOmtymMcAhm889noOrTcRNUJvqG2/+MK2UqIfIQ 5BJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=ccC3rdJLkZEle1esSbUWbjSjHW5QnOE8u707bMwi9Ws=; b=eMH7qZEkk3Z+YxoUoIbs1ow44L/XmCWEDvuyPJKScT3Qr/R7jInoSKTnIuDktgiFVB MY4cpe2Z5JOt9ZzHo7jBCHI80Lywi9127nhzkjxn3yXQxXMiArC6qq2FrxiugbwY77Bd Ks/Eaee5JqwJnTeQ8xRnY3QIRDAVAnh3wdYXfNQXSoKJBQS2kSWZ0cmdthQA+fTJJPM3 rim3Y4uknZhSAwenL9ddZ5aihZlawEWKHALFpDgzLuYJeH2t2RNosKCj3p4yjO6wjdkD e2Kq91kSr8QtH82/tgLkN6wohdZYD5/lZI+tKh9CV/PmS+VobereS0lePPhja/CjI594 48BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=omZtpQyq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y83-v6si28037276pff.117.2018.10.10.17.51.13; Wed, 10 Oct 2018 17:51:27 -0700 (PDT) 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=@google.com header.s=20161025 header.b=omZtpQyq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726097AbeJKIPZ (ORCPT + 99 others); Thu, 11 Oct 2018 04:15:25 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:38222 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbeJKIPZ (ORCPT ); Thu, 11 Oct 2018 04:15:25 -0400 Received: by mail-qt1-f194.google.com with SMTP id l9-v6so7999556qtf.5 for ; Wed, 10 Oct 2018 17:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ccC3rdJLkZEle1esSbUWbjSjHW5QnOE8u707bMwi9Ws=; b=omZtpQyqsKI5aA6jpGu1TNj0SsQxLoXyG5eUb7ghsLIyRN+f3ARMyAj3jqTN2tC6up XYN4uiJ1dD59rEgHgEq7HaJcwMVYyvTn9yTdl96QxzgRQV/qzJ8ftNxuKis9o5r+s4FV kILC1ylBl+h2ERG/gkj9vXCwKOSvLWHe21FZMVgr1y+TQNU5Y8wVDsXqOei+o1mYHcs3 8DBdETPZ3RRMSkB3btYZQTk+MDmlyCZXJPYsU4igvDIllH5+eV6hr70iHMjvGkeN0tHl 0c/yioey/Cj35ffEYyqUecXCPnB76IHfzTbNFbHIbFDv39NR3oJdubID+rEUJMyi9xL0 9nJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ccC3rdJLkZEle1esSbUWbjSjHW5QnOE8u707bMwi9Ws=; b=hmWYiNg/rYq60Ec1w4Yf1DaKqPIQv8tw/4fazR2kxbKAs6Npc2HlX14d5tQFIwQ8vl Z8vQW0H2Iissw78vBn/bKEqM97NnFTty04oflcrNsmZTeNR3NWR8w2JDmId/vBejdi0/ il2TolUtJcxUSVodcWR9eC94zg75jTr9Qgmzbqhv6AZ7WpYKLzqTIpa28aPpy/Rg/A1J JwONm/t+J+PxpTkWNCbOUeu+RBj4ECQc9G3pbdOe/D5QcpU8vxWM8yHRG8wmA2eOK8lI ANwThP60rFRv7l5cGup5enaUgzUIYiNiW9YHVT+IRPsdLFYkIsKzGXPuIym4pMiuI5xH TQuQ== X-Gm-Message-State: ABuFfog/72irI4zw4bYhIbh7Vr1YJbhlVKY1PZTFYGihpOKJ/PbprJ9i NzyBegxqislBLUVg4TP7Vbno2oVvNcgNjoP1hGRakg== X-Received: by 2002:ac8:2b76:: with SMTP id 51-v6mr18261650qtv.255.1539219040629; Wed, 10 Oct 2018 17:50:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:2a95:0:0:0:0:0 with HTTP; Wed, 10 Oct 2018 17:50:39 -0700 (PDT) In-Reply-To: <20181011004618.GA237677@joelaf.mtv.corp.google.com> References: <20181009201400.168705-1-joel@joelfernandes.org> <20181009220222.26nzajhpsbt7syvv@kshutemo-mobl1> <20181009230447.GA17911@joelaf.mtv.corp.google.com> <20181010100011.6jqjvgeslrvvyhr3@kshutemo-mobl1> <20181011004618.GA237677@joelaf.mtv.corp.google.com> From: Joel Fernandes Date: Wed, 10 Oct 2018 17:50:39 -0700 Message-ID: Subject: Re: [PATCH] mm: Speed up mremap on large regions To: Joel Fernandes Cc: "Kirill A. Shutemov" , LKML , "open list:MEMORY MANAGEMENT" , "Cc: Android Kernel" , Minchan Kim , Hugh Dickins , Lokesh Gidra , Andrew Morton , Greg Kroah-Hartman , Kate Stewart , Philippe Ombredanne , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 5:46 PM, Joel Fernandes wrote: > On Wed, Oct 10, 2018 at 01:00:11PM +0300, Kirill A. Shutemov wrote: [...] >> >> My worry is that some architecture has to allocate page table differently >> depending on virtual address (due to aliasing or something). Original page >> table was allocated for one virtual address and moving the page table to >> different spot in virtual address space may break the invariant. >> >> > Also the clean up of the argument that you're proposing is a bit out of scope >> > of this patch but yeah we could clean it up in a separate patch if needed. I >> > don't feel too strongly about that. It seems cosmetic and in the future if >> > the address that's passed in is needed, then the architecture can use it. >> >> Please, do. This should be pretty mechanical change, but it will help to >> make sure that none of obscure architecture will be broken by the change. >> > > The thing is its quite a lot of change, I wrote a coccinelle script to do it > tree wide, following is the diffstat: > 48 files changed, 91 insertions(+), 124 deletions(-) > > Imagine then having to add the address argument back in the future in case > its ever needed. Is it really worth doing it? Anyway I confirmed that the > address is NOT used for anything at the moment so your fears of the > optimization doing anything wonky really don't exist at the moment. I really > feel this is unnecessary but I am Ok with others agree the second arg to > pte_alloc should be removed in light of this change. Andrew, what do you > think? I meant to say here, "I am Ok if others agree the second arg to pte_alloc should be removed", but I would really like some input from the others as well on what they think.