From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C9F1C43381 for ; Mon, 11 Mar 2019 23:23:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B7B1214AE for ; Mon, 11 Mar 2019 23:23:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d6zKAfgU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="gZKWQc2K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B7B1214AE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e/CCoWru7hpN+NkcLO6M1y1rbCQTN1MI2Z173Pw52ws=; b=d6zKAfgUTBGSJ4 K8b4vjEpzyJcBa8VULi13SfihnoyEkLpjqL25RNWyuwyZMQtYeKIJQHzu0/lVhVQabuu/SG6z8Kir PP0wrLv3bNTq0srDpPnEqwavvNvZZQSaK9pw74GkXJkJvexk4I3gfRqM7XNnT/7v45MyEPubKDl8L k9RJSxNzNDzwUReMqYzUGj6/R4O5m9QdECWb96v9jqiCFUVQGEfbgqks6dzSn+RuJ2w7kD856OuzP dBk1RbfHjWrGWHpgC/6M19UwR++l3CPeU57Uc/h+bv7xooXu+cz+KZXmVydxDV16XRBXxdLPLFcqx jCvXBbQwhx7gq/KfkP7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3UGc-0007iD-Ql; Mon, 11 Mar 2019 23:23:34 +0000 Received: from mail-it1-x142.google.com ([2607:f8b0:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3UGY-0007h3-Jk for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 23:23:32 +0000 Received: by mail-it1-x142.google.com with SMTP id l139so1465419ita.5 for ; Mon, 11 Mar 2019 16:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2Iy+HRoKGbvYIX/HJ/Oa3YNfE4vvNj0SEEupfHgAt7I=; b=gZKWQc2KYwGAX3WowtGwdPrVrqqb8O6bfCdDhL1oyXMRPps7k/Zwmb6pXoM+qjET4y ip+aHfBkpp8BwRnBmV+PyaqmdFa+7T1XGd8BqUKvbh5hD9u0P3rz93oaPt9Eq6HsGs34 jgRj/Whff2r8sgBtjJ6NkZFimIloBJzAodGLYhC9pLsH5dCg26QMKYR9Vzm+6Vf5e0YZ 8cyq1PVFJILFTXtWlv/sVYeRRSjHGjMpPsYhXYXbjYX/tar0JYGUR63GNmlD8XOTUxMR +Dx6uSX090lfloxgp8KMYGqDlUaUNZm6h/JcRcxE1Sjm2keTgiwUwkSFiBhmWg7CVxi7 BSow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2Iy+HRoKGbvYIX/HJ/Oa3YNfE4vvNj0SEEupfHgAt7I=; b=A8TqhUT+btkNKc3mjJO6vk7lZ0TPg5Xjfr9z5IaHhpEu+78pbK0Szz+3mTbNftaPyP Cie3r/l/61rg6xBAzqSN6m+1NmMfI7e7233S8x9pdkbdo65OLcsJLLSkSUBHNB3gWksd TLntuV6jVjCPMiExpNjUEW6CnqCXz2BaFVByqtMV2HqgzCV1gxSTr31KiaL9zOsrRQ5L 5t+OSmmMTebb0k8Fd/pOu+NEh0Mzn40mxQn0EGS2xwEouSCFqhMnLP3SMfe3YLrMcGoV qEm+/0jlsURPaffoO2P7Bid3Jbt4gy7K9hWvREPH7WxaHVr7BgiyZK2jmzHMUIvRtfGa jKvg== X-Gm-Message-State: APjAAAWosDhOXokah5D5F4IywqINX4dJxSk1/RL6+Jc+quSDYuQJJP5y wM2EIaXFs7ekEoXdPxQhnrNxJw== X-Google-Smtp-Source: APXvYqyPGkSJFsx3J+ev890Ozq1EHLT5IDQIVnuh3g3snXm234Vr+JhVinPiWYKVphuheOwwdBLDpg== X-Received: by 2002:a24:c4c5:: with SMTP id v188mr448374itf.27.1552346608185; Mon, 11 Mar 2019 16:23:28 -0700 (PDT) Received: from google.com ([2620:15c:183:0:a0c3:519e:9276:fc96]) by smtp.gmail.com with ESMTPSA id w127sm443830itc.4.2019.03.11.16.23.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 11 Mar 2019 16:23:27 -0700 (PDT) Date: Mon, 11 Mar 2019 17:23:23 -0600 From: Yu Zhao To: Anshuman Khandual Subject: Re: [PATCH v3 1/3] arm64: mm: use appropriate ctors for page tables Message-ID: <20190311232323.GC207964@google.com> References: <20190218231319.178224-1-yuzhao@google.com> <20190310011906.254635-1-yuzhao@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_162330_669227_C324CFCD X-CRM114-Status: GOOD ( 19.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-arch@vger.kernel.org, Ard Biesheuvel , Peter Zijlstra , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Nick Piggin , Jun Yao , linux-mm@kvack.org, "Aneesh Kumar K . V" , Chintan Pandya , Joel Fernandes , "Kirill A . Shutemov" , Andrew Morton , Laura Abbott , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 11, 2019 at 01:15:55PM +0530, Anshuman Khandual wrote: > Hello Yu, > > We had some disagreements over this series last time around after which I had > posted the following series [1] which tried to enable ARCH_ENABLE_SPLIT_PMD_PTLOCK > after doing some pgtable accounting changes. After some thoughts and deliberations > I figure that its better not to do pgtable alloc changes on arm64 creating a brand > new semantics which ideally should be first debated and agreed upon in generic MM. > > Though I still see value in a changed generic pgtable page allocation semantics > for user and kernel space that should not stop us from enabling more granular > PMD level locks through ARCH_ENABLE_SPLIT_PMD_PTLOCK right now. > > [1] https://www.spinics.net/lists/arm-kernel/msg709917.html > > Having said that this series attempts to enable ARCH_ENABLE_SPLIT_PMD_PTLOCK with > some minimal changes to existing kernel pgtable page allocation code. Hence just > trying to re-evaluate the series in that isolation. > > On 03/10/2019 06:49 AM, Yu Zhao wrote: > > > For pte page, use pgtable_page_ctor(); for pmd page, use > > pgtable_pmd_page_ctor(); and for the rest (pud, p4d and pgd), > > don't use any. > > This is semantics change. Hence the question is why ? Should not we wait until a > generic MM agreement in place in this regard ? Can we avoid this ? Is the change > really required to enable ARCH_ENABLE_SPLIT_PMD_PTLOCK for user space THP which > this series originally intended to achieve ? > > > > > For now, we don't select ARCH_ENABLE_SPLIT_PMD_PTLOCK and > > pgtable_pmd_page_ctor() is a nop. When we do in patch 3, we > > make sure pmd is not folded so we won't mistakenly call > > pgtable_pmd_page_ctor() on pud or p4d. > > This makes sense from code perspective but I still dont understand the need to > change kernel pgtable page allocation semantics without any real benefit or fix at > the moment. Cant we keep kernel page table page allocation unchanged for now and > just enable ARCH_ENABLE_SPLIT_PMD_PTLOCK for user space THP benefits ? Do you see > any concern with that. This is not for kernel page tables (i.e. init_mm). This is to accommodate pre-allocated efi_mm page tables because it uses apply_to_page_range() which then calls pte_alloc_map_lock(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel