Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1710347pxb; Wed, 20 Oct 2021 10:13:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygbHN1BDQdgmI/PPFa4OA7O9PHCxBM6B1+cYfMxUoITjC4CfJXq/eZNOioOjBm5//TTbJG X-Received: by 2002:a17:90b:3ecc:: with SMTP id rm12mr182276pjb.48.1634749982401; Wed, 20 Oct 2021 10:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634749982; cv=none; d=google.com; s=arc-20160816; b=F/tIL9wfb6khptHWAdxCgl0UmMSKVYWLxcDNc+vGlqPfdZFefq78dplzAWxxztstru RPkTYr/A0KHRp8XlpJ4O+4yZNVoZVOUZNJl/vRoWZP4lw05mDjalFX3kZGMvJY6hoOpO TjuF/ENdi3pDxSw64oonEWe6L2N6My5S+aXFCTj9umXVGaJ3igQirKYlMH7sYqO6PluU JbMkojlJRiZK+liQ8NJEoyju0rzGem+raeofm8+D3MHGMEAGE1u4rt5EsJNeRsuSQjw/ rGk6ShbfYM+XGgLF+lCmCeFc73w0y0sFg6hWMSrk6ASafhSEs4hki7LqBuJG3SzXfIWW mRwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yh4VNQVbmqEE1XoY0HfdKCiOCUMZEFg9p2e4mySh1ho=; b=Gg0DcfSowM2rcnxKFpl59bnYV/UGBmpHYrFZ96P0GASV2VYUuNuf0f5zmxkkwedGp9 6Pr64OrbxzMv6c8DFLiDBJWOnSrDvJwM4EANlK/wwH+j3jp/1shEkyAB+yKqQsvD5hoN G3X/tETucl9xfNz/rzoh3ipJwYOpHrT3odN0Od6eUvm+/qDM/4QqW+bOfwI0Jjd5Y2M7 LBcESRCeRGlBWJdXlXS8mmJRK5Vj65ShpH2AKcwncYWU+99psbrujh48jIRIOgcIqgpZ 2EIT1XGnP/XMdccazNH+YkH8yowDHM6v6Cz14GtRjNCjaROnj/WDW3W8V4rC7pVT7Cr8 +6Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=gXp+nm6K; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si3948404pfc.84.2021.10.20.10.12.47; Wed, 20 Oct 2021 10:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=gXp+nm6K; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbhJTRPB (ORCPT + 99 others); Wed, 20 Oct 2021 13:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbhJTRPA (ORCPT ); Wed, 20 Oct 2021 13:15:00 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEA5C061749 for ; Wed, 20 Oct 2021 10:12:46 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id o133so3502937pfg.7 for ; Wed, 20 Oct 2021 10:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yh4VNQVbmqEE1XoY0HfdKCiOCUMZEFg9p2e4mySh1ho=; b=gXp+nm6KP18UxdU9Hk3ApH1mhWLfoJo59VGT/uI2ErBwWWyik4nmEDpSY+ZrwJRKsD 1m2G6rHPn7W/JZ+E3tckd4iJSTd6DrCA1haY52Re29y61eWHiifpVeHfZXxxVG0OyAIG SNKtPfTbbylxqWGsIA6ibBarKTRo4H14iXLyBREaAXG+H2DN8uhwtgKoCeWK8woL61v/ h3zf1b5/RLytsJ/EioaqOo91sbl+0/PnLuBJrtfYdYpnEHnps1RtQHpp6zHlZvn6BAf5 ILV5/M+yMBS3ApNMZ1KgMy5ldAYTELk9W2MzVGpH+zHnvMYELSkCHHRjl7R71WGss/j1 /9/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yh4VNQVbmqEE1XoY0HfdKCiOCUMZEFg9p2e4mySh1ho=; b=HDBV9hNY6X+H+b8MZ2k5eTTg9CV1j/EXEySeGFTYjFBHrozZV3qjlbCgpz7oN2pDaz //8s/2ifqUYw/OFbYcINOFx36IufKmswLcvOfYju/m/6jRWtAk+HF7SkTXAFqWbgVTrr 1Qedm3xqs/JFyPyiWksaKtTADZKpE2+Aq/Ej10RYCwZSmA72Jx/VWLdXzAdt6GXrlu1H oqJ6HvpDeySpMnCYmlt9THM7b/ymoHarUsQ0bb8k2oazkuueKUAlOQYLa1HfDbSpjTOM r+/jehPVupAfy1/cxhlCR/K/Kn/XvCfkF1Opq+o4HuYGbiSMcd7oclQBtDuaClQIxCng eJCA== X-Gm-Message-State: AOAM532gfOcK7GwXnhFtHQHDPYIXyggQ8t6qlNmoXDTFoy6EcS2nGx35 bS/bHu4+xbjbcYQ6JctB9Yz0pojcmLWFqRbZ8oFxdg== X-Received: by 2002:a63:1e0e:: with SMTP id e14mr388190pge.5.1634749965551; Wed, 20 Oct 2021 10:12:45 -0700 (PDT) MIME-Version: 1.0 References: <20211014230606.GZ2744544@nvidia.com> <20211016154450.GJ2744544@nvidia.com> <20211018182559.GC3686969@ziepe.ca> <20211018230614.GF3686969@ziepe.ca> <499043a0-b3d8-7a42-4aee-84b81f5b633f@oracle.com> <20211019160136.GH3686969@ziepe.ca> In-Reply-To: From: Dan Williams Date: Wed, 20 Oct 2021 10:12:35 -0700 Message-ID: Subject: Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount To: Joao Martins Cc: Jason Gunthorpe , Matthew Wilcox , Alex Sierra , Andrew Morton , "Kuehling, Felix" , Linux MM , Ralph Campbell , linux-ext4 , linux-xfs , amd-gfx list , Maling list - DRI developers , Christoph Hellwig , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Alistair Popple , Vishal Verma , Dave Jiang , Linux NVDIMM , David Hildenbrand Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Oct 20, 2021 at 10:09 AM Joao Martins wrote: > > On 10/19/21 20:21, Dan Williams wrote: > > On Tue, Oct 19, 2021 at 9:02 AM Jason Gunthorpe wrote: > >> > >> On Tue, Oct 19, 2021 at 04:13:34PM +0100, Joao Martins wrote: > >>> On 10/19/21 00:06, Jason Gunthorpe wrote: > >>>> On Mon, Oct 18, 2021 at 12:37:30PM -0700, Dan Williams wrote: > >>>> > >>>>>> device-dax uses PUD, along with TTM, they are the only places. I'm not > >>>>>> sure TTM is a real place though. > >>>>> > >>>>> I was setting device-dax aside because it can use Joao's changes to > >>>>> get compound-page support. > >>>> > >>>> Ideally, but that ideas in that patch series have been floating around > >>>> for a long time now.. > >>>> > >>> The current status of the series misses a Rb on patches 6,7,10,12-14. > >>> Well, patch 8 too should now drop its tag, considering the latest > >>> discussion. > >>> > >>> If it helps moving things forward I could split my series further into: > >>> > >>> 1) the compound page introduction (patches 1-7) of my aforementioned series > >>> 2) vmemmap deduplication for memory gains (patches 9-14) > >>> 3) gup improvements (patch 8 and gup-slow improvements) > >> > >> I would split it, yes.. > >> > >> I think we can see a general consensus that making compound_head/etc > >> work consistently with how THP uses it will provide value and > >> opportunity for optimization going forward. > >> > > I'll go do that. Meanwhile, I'll wait a couple days for Dan to review the > dax subsystem patches (6 & 7), or otherwise send them over. > > >>> Whats the benefit between preventing longterm at start > >>> versus only after mounting the filesystem? Or is the intended future purpose > >>> to pass more context into an holder potential future callback e.g. nack longterm > >>> pins on a page basis? > >> > >> I understood Dan's remark that the device-dax path allows > >> FOLL_LONGTERM and the FSDAX path does not ? > >> > >> Which, IIRC, today is signaled basd on vma properties and in all cases > >> fast-gup is denied. > > > > Yeah, I forgot that 7af75561e171 eliminated any possibility of > > longterm-gup-fast for device-dax, let's not disturb that status quo. > > > I am slightly confused by this comment -- the status quo is what we are > questioning here -- And we talked about changing that in the past too > (thread below), that longterm-gup-fast was an oversight that that commit > was only applicable to fsdax. [Maybe this is just my english confusion] No, you have it correct. However that "regression" has gone unnoticed, so unless there is data showing that gup-fast on device-dax is critical for longterm page pinning workflows I'm ok for longterm to continue to trigger gup-slow.