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.6 required=3.0 tests=BAYES_40,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 B56A2C433E6 for ; Sat, 20 Feb 2021 01:24:22 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 4362664E44 for ; Sat, 20 Feb 2021 01:24:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4362664E44 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0E3FD100EBB9B; Fri, 19 Feb 2021 17:24:22 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::62e; helo=mail-ej1-x62e.google.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 54A43100EBB8D for ; Fri, 19 Feb 2021 17:24:19 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id g5so17272339ejt.2 for ; Fri, 19 Feb 2021 17:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OI5diTT0Rk6aefWjwmf2Q0VLq/9wnZnAvXpY8uK5nUQ=; b=zJfceaRPvyJ6XZa2IRAPEjVVrbFYpp8LYpGQ3my7yGihQIEhzjOCVxmTiO2uw4T73u 2jk3Kb3huR1HG20iemJlm8FOxMT9lJ2P4dszGflF0jW0bKFGsS4TA2Vxw0kW9N2uCoBj F6aoBFfaGVoP+nnQ8z6hWWxZgRIDNLm144edAxTalfKaXHfJvOGEHzG5SWx/xU0GA4aM TUlLVu1u53Vf65vMDCwbLfLR/XGx/sSDa7ifiTleuevxNChFpoI8RbX76fnrHEvI5QU/ xR2Qyp51J8IaK4ZyiCfWPQ61mkF00O41wSjPMXtviS5Ak/qyvtQjPYO5gbBEALVImwEF to2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OI5diTT0Rk6aefWjwmf2Q0VLq/9wnZnAvXpY8uK5nUQ=; b=ZTgrxumVpoYdEBcUc5aXxBeXDNUGkhLdT/YDXGFhN5HoYi5ICUVdxJ8eXaZofSVyKy DcQ6diMj+JFlAJ9vhLgLtwlP8Wmh4FffkFz52XMlHeuIR4kI4qRES+yAdAgbND0Bk2UO eq2j+wfW0hN8wUDR2if8U/T61Xhd/J6/MSrBojDJXMBmBDJAf83DQltxnNuUWZqXPc9r JL30JPH+BBAbI2cVLR4xGyffIZm2mlFhyLk/1KIbINOI4CMGqtIjOfK3DW8GkiZWq2kx kh2TXmPd8cCQC9DnEf0wiPqC/Bn73dmBuFQ31bOthAht4IyK0CLbMbz/fyIFh2nh6cF3 F4Zg== X-Gm-Message-State: AOAM532OUO2I0hiemSaxAskwGJvpUxhuEYVCv8p9JDw3G+YcGRqvbDha m6TWXCgJfFmWlUOKAR1Oh4xkDx6BzlxIw1E++onWGA== X-Google-Smtp-Source: ABdhPJyjHZZthx7MXPgxEnYR0n72AWETmXUIaUMfKn+DeqJXKwrmkbsGa/sIRoVbcrPAlQ6imr1TpcrwgPxKoAq3ajU= X-Received: by 2002:a17:906:cc91:: with SMTP id oq17mr10915211ejb.45.1613784257719; Fri, 19 Feb 2021 17:24:17 -0800 (PST) MIME-Version: 1.0 References: <20201208172901.17384-1-joao.m.martins@oracle.com> <20201208172901.17384-2-joao.m.martins@oracle.com> In-Reply-To: <20201208172901.17384-2-joao.m.martins@oracle.com> From: Dan Williams Date: Fri, 19 Feb 2021 17:24:09 -0800 Message-ID: Subject: Re: [PATCH RFC 1/9] memremap: add ZONE_DEVICE support for compound pages To: Joao Martins Message-ID-Hash: OCPXUZ3O66CYU5NMH2VXWA562UISG7EW X-Message-ID-Hash: OCPXUZ3O66CYU5NMH2VXWA562UISG7EW X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Linux MM , linux-nvdimm , Matthew Wilcox , Jason Gunthorpe , Muchun Song , Mike Kravetz , Andrew Morton X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Dec 8, 2020 at 9:32 AM Joao Martins wrote: > > Add a new flag for struct dev_pagemap which designates that a a pagemap > is described as a set of compound pages or in other words, that how > pages are grouped together in the page tables are reflected in how we > describe struct pages. This means that rather than initializing > individual struct pages, we also initialize these struct pages, as > compound pages (on x86: 2M or 1G compound pages) > > For certain ZONE_DEVICE users, like device-dax, which have a fixed page > size, this creates an opportunity to optimize GUP and GUP-fast walkers, > thus playing the same tricks as hugetlb pages. > > Signed-off-by: Joao Martins > --- > include/linux/memremap.h | 2 ++ > mm/memremap.c | 8 ++++++-- > mm/page_alloc.c | 7 +++++++ > 3 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/include/linux/memremap.h b/include/linux/memremap.h > index 79c49e7f5c30..f8f26b2cc3da 100644 > --- a/include/linux/memremap.h > +++ b/include/linux/memremap.h > @@ -90,6 +90,7 @@ struct dev_pagemap_ops { > }; > > #define PGMAP_ALTMAP_VALID (1 << 0) > +#define PGMAP_COMPOUND (1 << 1) Why is a new flag needed versus just the align attribute? In other words there should be no need to go back to the old/slow days of 'struct page' per pfn after compound support is added. _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org