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=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 52E8BC433DB for ; Tue, 23 Feb 2021 22:48:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7087264E60 for ; Tue, 23 Feb 2021 22:48:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7087264E60 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E03666B0005; Tue, 23 Feb 2021 17:48:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D8B806B0006; Tue, 23 Feb 2021 17:48:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C52756B006E; Tue, 23 Feb 2021 17:48:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id ABBB86B0005 for ; Tue, 23 Feb 2021 17:48:26 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 63BFD45BC for ; Tue, 23 Feb 2021 22:48:26 +0000 (UTC) X-FDA: 77851023012.20.82B04AA Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by imf13.hostedemail.com (Postfix) with ESMTP id 51C71E000101 for ; Tue, 23 Feb 2021 22:48:23 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id r17so2820ejy.13 for ; Tue, 23 Feb 2021 14:48:25 -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=utqrte5njtReY0wG/Z3veQ9qWAdkPkCn5cfJZJyg6bo=; b=LiBdc3KtcUX2h4zj4qDhPbz7Vbhk3LbV04a3tI6bodDVgR32pz6A+W8H0um97NS9Lr ggU0Seiiyc3rsD3S9Tg0YxrpA0AHny/BiUjJKTXsSU+RUjHAJ4qcx8ozeTz7ZGyKbN1M pGUgw4n3UjMGgyLLjhuPTo9q5kixr31ras5CTU6VsbSon26t4FecmGJRpgJART+1cmw1 sVLKFpbRmcoXjGJH5+lcm3cP5JpX+6/OA8ZP3vNFte2ptAjm+AgbdPqZoG8RrgsIPO1e tu1vNDN5jkGG75Mae6VNsROib3mujKDzLX4KcaVjvi/bpwN9yt26/0/ihXu3ZszMfOMh 9i6Q== 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=utqrte5njtReY0wG/Z3veQ9qWAdkPkCn5cfJZJyg6bo=; b=hB64HKSoxN+dO4w2fZgAoeYRt4hh1Bu3BAxrm+BHXB+kWR2U5RDjtbUNbN4kpKeZsz 4LVrZ1IsBS3HjuPpviD3lcb2t0wF13Lyxz9EBMwZIj8M/+KsuZ1mxsHuQ9iaWhHohK1x xII1ombOGeib+m/SbWUrVyRBEfYYjyjv7Q97GuYp299/pfWHUb7G2fCOpEZXVUaqHwbF xkgJau0ImDdF2EBh0s8bmMN5O2H+oBlfvMGI6ra+okSu9Fsu5UksC40t0MQCeMQbSSay fR0yC/Oy6erNrP97+E1b5lrg6t5wryYNNNQcY6DZT6BT9zSqx2Pnx9SRfE05xj2OX3Lj SQ2g== X-Gm-Message-State: AOAM5319jWUvS350zqyF7xy3n2dACOmNgyLuTbRYy9sBaU86B9xntJs5 6dLY22aULkSWaMLrivDeEA3iIEth+isq9dVXLfLlHg== X-Google-Smtp-Source: ABdhPJxOeF+0YxvLFBx8TcAxLNMINPN0/N/SIl8wsbXZm8lye6NyJGla5zyHcDu9BO5zGcekAuVvQOqtS5eYo8UN0nQ= X-Received: by 2002:a17:906:cc91:: with SMTP id oq17mr27779064ejb.45.1614120504150; Tue, 23 Feb 2021 14:48:24 -0800 (PST) MIME-Version: 1.0 References: <20201208172901.17384-1-joao.m.martins@oracle.com> <6a18179e-65f7-367d-89a9-d5162f10fef0@oracle.com> <20210223185435.GO2643399@ziepe.ca> In-Reply-To: <20210223185435.GO2643399@ziepe.ca> From: Dan Williams Date: Tue, 23 Feb 2021 14:48:20 -0800 Message-ID: Subject: Re: [PATCH RFC 0/9] mm, sparse-vmemmap: Introduce compound pagemaps To: Jason Gunthorpe Cc: Joao Martins , Linux MM , Ira Weiny , linux-nvdimm , Matthew Wilcox , Jane Chu , Muchun Song , Mike Kravetz , Andrew Morton Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 51C71E000101 X-Stat-Signature: f1z7pr8hbnisqrb65x8h8ynffboy8hjp Received-SPF: none (intel.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=mail-ej1-f45.google.com; client-ip=209.85.218.45 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614120503-55319 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 23, 2021 at 10:54 AM Jason Gunthorpe wrote: > > On Tue, Feb 23, 2021 at 08:44:52AM -0800, Dan Williams wrote: > > > > The downside would be one extra lookup in dev_pagemap tree > > > for other pgmap->types (P2P, FSDAX, PRIVATE). But just one > > > per gup-fast() call. > > > > I'd guess a dev_pagemap lookup is faster than a get_user_pages slow > > path. It should be measurable that this change is at least as fast or > > faster than falling back to the slow path, but it would be good to > > measure. > > What is the dev_pagemap thing doing in gup fast anyhow? > > I've been wondering for a while.. It's there to synchronize against dax-device removal. The device will suspend removal awaiting all page references to be dropped, but gup-fast could be racing device removal. So gup-fast checks for pte_devmap() to grab a live reference to the device before assuming it can pin a page.