Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1242817pxa; Thu, 6 Aug 2020 03:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG2ntwwR5YmOeTSfudxSHlHmqMurYBYibz0xh7pXXFDH7AEftGMuJiMEZzUMINUUqYiDts X-Received: by 2002:a05:6402:84e:: with SMTP id b14mr3250759edz.115.1596708775610; Thu, 06 Aug 2020 03:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596708775; cv=none; d=google.com; s=arc-20160816; b=RN1589GIyTuh6Ymlsb3dk8m0Pr4TS3YwvUHgFTW8Yo8OT7vIR1jgc+v5S/Nn68QQEx Krxj0FTZwGf4F1gBsPstck9n3HK3lzVLaqq6mk3n9uIInfWn4pbMJ0Vb6lg8rIXds5cn WOxqXN817HRX+0MQubxGHoBwQAWZQKrJRMiBvd9RrIvZGGiDQUdnEW2LAeKF3aIYFV49 PJf/alDYwUcaNAZmp11mpr2/AoqZ5FKntuwNYGPscDBZaOwcZSUzMHRPniPrWOmPkBjV xzqx/QlNSHyU1s7jeCYAIDzJhYs3SaUsQ5cqI7EtUS4plpJau8vqCH/O7JwPsuvEGNXa lA9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FmHNrmiGc1oEc9Yta/aBuQn+1EulEN2xZuLGLoeLXHQ=; b=NNBtPTJvEH4ARlmcILE3yW6zMYM+RMClEA6NiQiRjyAaNH3P6RihihIvTMKsmGzesS 2wM6iEneBRrRz54WYuKyvRXrY78gI4ReEKLz3up60y92bmG3kboE/5lwdgl+Fg6W+ovR YZPOpscRju7/lbe1hiU/jy79KxaiCw7jm3rFRxo/RI4wZvmymgaY6IZ971bTgLc+HphX nptxdJxgwrdA9gjrRbKpHCXzHEYe17CLXX+U/j0Sng/y+Kc/scUQbs50OfKJ9C043Bc3 fHE+IN4+7o6EBTEZNp1a8dUq7QWNwbxWnbKQ3yA1KEh8oGEDBP0ts6utfKbGH0ub3yb6 KzEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=vdAe04pQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id um11si2991298ejb.117.2020.08.06.03.12.31; Thu, 06 Aug 2020 03:12:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=vdAe04pQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729314AbgHFKL4 (ORCPT + 99 others); Thu, 6 Aug 2020 06:11:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729146AbgHFKLP (ORCPT ); Thu, 6 Aug 2020 06:11:15 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD35C061757 for ; Thu, 6 Aug 2020 03:11:13 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id m15so25150159lfp.7 for ; Thu, 06 Aug 2020 03:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FmHNrmiGc1oEc9Yta/aBuQn+1EulEN2xZuLGLoeLXHQ=; b=vdAe04pQJi4piGZ5+mZ0j2zhjTn6XVtWXoKVvfYvjkZt497I/uZbgq0bCXUw9yqxv1 aDwbG4fQLRxllT940g4JJIoLaihdHAzLTznrUByrMW1Sxn0NV4LG6ITrocLkxfQ/UbR8 /22r5p3LxUUJDP/bT5Lo9OvmnoXmRxUSyOPo0gH4uKUH+elU8Mn1VlYg4xH7/Swt6AEz woNXvCrI7kpsrhxnMJDhchfVxMGgUKsXYC/i/xUa92sA04Rdaab+RLuwLDiP7hERRYMU MGSXXRnFS4yE+plzwECIlQPOIq5Q9sL11BNdJXjz4h7FpV4jOJJQ0vybui6R3DGZ4y4F e/Cw== 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; bh=FmHNrmiGc1oEc9Yta/aBuQn+1EulEN2xZuLGLoeLXHQ=; b=Pf2VPNUbwZbwK/lz1ezP0b9NRWzfq9rx9Gz93U43NFbZC3jeOketJOnJYU6QmVhkGw Enb142NzQKekhE2Ba80j+cw5lWW8Bmes/O8c/BV2V2N4a3xhjPnBGAFMTTYIxodk4ueP mndb2iGtU4E2nXg28DndH0ZTR0BSYwEOTSVJEsceZ0SP3dk5c6g5n5oz9DlKN4UOtg8l 3J6YU4Bgn+VDYFJiiSJXOrfzMvg/4QX1cMwc/IWnoV23RcixdxP9dYAMUnnh6hP/TFKo rsn+BD46lRbWabKFnPcJmSeaWs+m6ZFr42ZAdNrUvyG56ZyQ7pWb0hIMisuyioV17jeF t3ww== X-Gm-Message-State: AOAM5335sfm2Q5hncnCim2d+ioe24pI2P6bSYStbmyCOP34sP9esufUn QMJvu40SDb4tIwsil4LacLsj3w== X-Received: by 2002:a19:70c:: with SMTP id 12mr3611270lfh.207.1596708665300; Thu, 06 Aug 2020 03:11:05 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id v9sm2356183lja.81.2020.08.06.03.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 03:11:04 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 92823102E1B; Thu, 6 Aug 2020 13:11:12 +0300 (+03) Date: Thu, 6 Aug 2020 13:11:12 +0300 From: "Kirill A. Shutemov" To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Alexander Viro , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Idan Yaniv , Ingo Molnar , James Bottomley , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v3 1/6] mm: add definition of PMD_PAGE_ORDER Message-ID: <20200806101112.bjw4mxu2odpsg2hh@box> References: <20200804095035.18778-1-rppt@kernel.org> <20200804095035.18778-2-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804095035.18778-2-rppt@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 04, 2020 at 12:50:30PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The definition of PMD_PAGE_ORDER denoting the number of base pages in the > second-level leaf page is already used by DAX and maybe handy in other > cases as well. > > Several architectures already have definition of PMD_ORDER as the size of > second level page table, so to avoid conflict with these definitions use > PMD_PAGE_ORDER name and update DAX respectively. > > Signed-off-by: Mike Rapoport > --- > fs/dax.c | 10 +++++----- > include/linux/pgtable.h | 3 +++ > 2 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/fs/dax.c b/fs/dax.c > index 11b16729b86f..b91d8c8dda45 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -50,7 +50,7 @@ static inline unsigned int pe_order(enum page_entry_size pe_size) > #define PG_PMD_NR (PMD_SIZE >> PAGE_SHIFT) > > /* The order of a PMD entry */ > -#define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT) > +#define PMD_PAGE_ORDER (PMD_SHIFT - PAGE_SHIFT) Hm. Wouldn't it conflict with definition in pgtable.h? Or should we include it instead? > diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > index 56c1e8eb7bb0..79f8443609e7 100644 > --- a/include/linux/pgtable.h > +++ b/include/linux/pgtable.h > @@ -28,6 +28,9 @@ > #define USER_PGTABLES_CEILING 0UL > #endif > > +/* Number of base pages in a second level leaf page */ > +#define PMD_PAGE_ORDER (PMD_SHIFT - PAGE_SHIFT) > + > /* > * A page table page can be thought of an array like this: pXd_t[PTRS_PER_PxD] > * -- Kirill A. Shutemov