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=-10.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 DAE44C433FB for ; Thu, 6 Aug 2020 11:15:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 281A822DFB for ; Thu, 6 Aug 2020 11:15:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="vdAe04pQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbgHFKL6 (ORCPT ); Thu, 6 Aug 2020 06:11:58 -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-Google-Smtp-Source: ABdhPJztxQdmUqdlmLCUV07uqArQbN1pckvCcR5Q9hxz1Dr0Q7jnsmbBT95GM1N8CkcdipmeoNGGIA== 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