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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F1E1C4332F for ; Wed, 9 Feb 2022 12:30:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5272D10E3F1; Wed, 9 Feb 2022 12:30:00 +0000 (UTC) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by gabe.freedesktop.org (Postfix) with ESMTPS id 031C310E3F1 for ; Wed, 9 Feb 2022 12:29:58 +0000 (UTC) Received: by mail-qv1-xf36.google.com with SMTP id k4so1591063qvt.6 for ; Wed, 09 Feb 2022 04:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=Z4Eu786ojGcRgS8Eos4sLr66z2Uqqmgi/bDj6/Y33EEsvVWVKeCNJioyDR9vfy9xaY yz3EOxCOZS/4g/fgKsh1/TNwzJVTuJBYxARJaHsw7OoHQBYA7L/O3QtbTl8+Tpf3u32c Go3MoLTkH16938QXNFcpZV2qsCQ+/yOIxJO8+ooqAbmuC9zUdvg0Bg4KHC7DQZrRu5Pr MEV4AdWysZ66pZX4YRzJgy6PJ/mfwT6AapS6FtqHr95tVUvZ/ng6ysJBJp+d6N+bSxfV V5qGUskZ4AiQdRAYVMO4Llk3dzOmsNqH1liuPvseANE5HTBFUWXt5H7TVNAa03BHV8C3 wh9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=d8sez69msLRhGns6R+F6+/4lPZ6ZG+71pcgS5nnfFv/JiZhT41MjXdV/0KZxOPXbiU SiAAd0v+JtY5X0IsDIrLT1+BICxGlsBk7sRb0GsngrhwpTG+8vPqVwvF8/niyNeD960K 3ZY49jUzPYHeUjo2LE88KgzdsNyQc+ECMeg0m5cFsn2THMW+miNy6mW5m+Zb5v26DeyH 32hU1gqVhsReQvqAbc0tqNUiQp9NpLH5Kz6y39d3ewLltd7P3ara9Efdn28BtT9tT4GE Q0jaBwUAtaUxHP8ZJ/SmKKG6N1o6VHfNjwarA1v9oKwKhj8sYCa8ITHbTFdYzNqGWnnq 2T1g== X-Gm-Message-State: AOAM530DeJBhp1+EVkAmFyxt2siTtLlwsMt0FQcShnYicyM2triQsMky JXdf2scw85v1OHMaPH/YxUyxQw== X-Google-Smtp-Source: ABdhPJwf9mdnK2ldlbFJ89Gp7ICZZlJoeyugDA0YNF0idT1dfs12KR4knXDFD3wj+Sh7mIvt9ShqvQ== X-Received: by 2002:a05:6214:21ac:: with SMTP id t12mr1263884qvc.123.1644409797997; Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id w13sm8052274qkb.106.2022.02.09.04.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nHm6e-001DJi-6l; Wed, 09 Feb 2022 08:29:56 -0400 Date: Wed, 9 Feb 2022 08:29:56 -0400 From: Jason Gunthorpe To: Christoph Hellwig Subject: Re: [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount Message-ID: <20220209122956.GI49147@ziepe.ca> References: <20220207063249.1833066-1-hch@lst.de> <20220207063249.1833066-8-hch@lst.de> <20220209062345.GB7739@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209062345.GB7739@lst.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux NVDIMM , Ralph Campbell , Alistair Popple , Maling list - DRI developers , Karol Herbst , nouveau@lists.freedesktop.org, Felix Kuehling , "Pan, Xinhui" , Linux Kernel Mailing List , amd-gfx list , Christian =?utf-8?B?S8O2bmln?= , Linux MM , Ben Skeggs , Alex Deucher , Dan Williams , Logan Gunthorpe , Andrew Morton Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Feb 09, 2022 at 07:23:45AM +0100, Christoph Hellwig wrote: > On Tue, Feb 08, 2022 at 07:30:11PM -0800, Dan Williams wrote: > > Interesting. I had expected that to really fix the refcount problem > > that fs/dax.c would need to start taking real page references as pages > > were added to a mapping, just like page cache. > > I think we should do that eventually. But I think this series that > just attacks the device private type and extends to the device coherent > and p2p enhacements is a good first step to stop the proliferation of > the one off refcount and to allow to deal with the fsdax pages in another > more focuessed series. It is nice, but the other series are still impacted by the fsdax mess - they still stuff pages into ptes without proper refcounts and have to carry nonsense to dance around this problem. I certainly would be unhappy if the amd driver, for instance, gained the fsdax problem as well and started pushing 4k pages into PMDs. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E31E2F24 for ; Wed, 9 Feb 2022 12:29:58 +0000 (UTC) Received: by mail-qv1-f48.google.com with SMTP id a19so1604991qvm.4 for ; Wed, 09 Feb 2022 04:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=Z4Eu786ojGcRgS8Eos4sLr66z2Uqqmgi/bDj6/Y33EEsvVWVKeCNJioyDR9vfy9xaY yz3EOxCOZS/4g/fgKsh1/TNwzJVTuJBYxARJaHsw7OoHQBYA7L/O3QtbTl8+Tpf3u32c Go3MoLTkH16938QXNFcpZV2qsCQ+/yOIxJO8+ooqAbmuC9zUdvg0Bg4KHC7DQZrRu5Pr MEV4AdWysZ66pZX4YRzJgy6PJ/mfwT6AapS6FtqHr95tVUvZ/ng6ysJBJp+d6N+bSxfV V5qGUskZ4AiQdRAYVMO4Llk3dzOmsNqH1liuPvseANE5HTBFUWXt5H7TVNAa03BHV8C3 wh9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=47UEDf+zFyhDmAZEjxP0YBE2zmZj101vx3XJPveTb3qdVlGsot0kUp3NbtB3JBWUK6 zjSVcYoSgydnTyx5H9e8IQny3hnV+z9Zoq6xXLQtCpzBD7qTOiOdJ9VqU55GfxqTkRqa 0j9BFOY0Pq2NNbBe/KarBoJ93TVJaeuNzXD3eLN5yZKR15yYh/LVETuj2H1bmVNZgfNs apmwbbEvBj4CcqD6u7n1kF0cKXmJG284psFNb5XgGOO45o+lSsx5QAwg7Loo5Dfe9v/I SfloksbvODSnOHSK/IfyhxK7tqmlWDxBBNPoEqPsJn013iNZQy4BYmAhkBwqHzbCqcah XPfg== X-Gm-Message-State: AOAM532OlnzX+NZCvzWb010hxfPMCJLMxA19SQFVAhmb0KSp7Gy/aTFz XycvL5bYPO6tCbEUiWRDrwwmkw== X-Google-Smtp-Source: ABdhPJwf9mdnK2ldlbFJ89Gp7ICZZlJoeyugDA0YNF0idT1dfs12KR4knXDFD3wj+Sh7mIvt9ShqvQ== X-Received: by 2002:a05:6214:21ac:: with SMTP id t12mr1263884qvc.123.1644409797997; Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id w13sm8052274qkb.106.2022.02.09.04.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nHm6e-001DJi-6l; Wed, 09 Feb 2022 08:29:56 -0400 Date: Wed, 9 Feb 2022 08:29:56 -0400 From: Jason Gunthorpe To: Christoph Hellwig Cc: Dan Williams , Andrew Morton , Felix Kuehling , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , "Pan, Xinhui" , Ben Skeggs , Karol Herbst , Lyude Paul , Alistair Popple , Logan Gunthorpe , Ralph Campbell , Linux Kernel Mailing List , amd-gfx list , Maling list - DRI developers , nouveau@lists.freedesktop.org, Linux NVDIMM , Linux MM Subject: Re: [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount Message-ID: <20220209122956.GI49147@ziepe.ca> References: <20220207063249.1833066-1-hch@lst.de> <20220207063249.1833066-8-hch@lst.de> <20220209062345.GB7739@lst.de> Precedence: bulk X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209062345.GB7739@lst.de> On Wed, Feb 09, 2022 at 07:23:45AM +0100, Christoph Hellwig wrote: > On Tue, Feb 08, 2022 at 07:30:11PM -0800, Dan Williams wrote: > > Interesting. I had expected that to really fix the refcount problem > > that fs/dax.c would need to start taking real page references as pages > > were added to a mapping, just like page cache. > > I think we should do that eventually. But I think this series that > just attacks the device private type and extends to the device coherent > and p2p enhacements is a good first step to stop the proliferation of > the one off refcount and to allow to deal with the fsdax pages in another > more focuessed series. It is nice, but the other series are still impacted by the fsdax mess - they still stuff pages into ptes without proper refcounts and have to carry nonsense to dance around this problem. I certainly would be unhappy if the amd driver, for instance, gained the fsdax problem as well and started pushing 4k pages into PMDs. Jason 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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0288CC433EF for ; Wed, 9 Feb 2022 12:30:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70BBA10E3FF; Wed, 9 Feb 2022 12:30:00 +0000 (UTC) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 05C2510E440 for ; Wed, 9 Feb 2022 12:29:58 +0000 (UTC) Received: by mail-qv1-xf2f.google.com with SMTP id d7so1610271qvk.2 for ; Wed, 09 Feb 2022 04:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=Z4Eu786ojGcRgS8Eos4sLr66z2Uqqmgi/bDj6/Y33EEsvVWVKeCNJioyDR9vfy9xaY yz3EOxCOZS/4g/fgKsh1/TNwzJVTuJBYxARJaHsw7OoHQBYA7L/O3QtbTl8+Tpf3u32c Go3MoLTkH16938QXNFcpZV2qsCQ+/yOIxJO8+ooqAbmuC9zUdvg0Bg4KHC7DQZrRu5Pr MEV4AdWysZ66pZX4YRzJgy6PJ/mfwT6AapS6FtqHr95tVUvZ/ng6ysJBJp+d6N+bSxfV V5qGUskZ4AiQdRAYVMO4Llk3dzOmsNqH1liuPvseANE5HTBFUWXt5H7TVNAa03BHV8C3 wh9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JpFYQSMAVe6I09BHQOjAX13imKhzUaXlc2+fdsD9V6E=; b=7RsKpNU+IIUHsKZjHRm9SUMwrLuetLN6h4bFrCprynzVdeTfGA52XdUb/J2EJ/docp weSB7c/8vCVXFjcWfCuQHKzbcPXI1QcRNop8M4w1/1+/H6LjH7U9wIJQFao8h2fbMWQt MVOPbWCG/l/m39f5wFio8r85RWxzH5wpWvg6IUw44Yaww6I2jMLulh+Fs0T8RKEixrnA 6RY1VkmT8LrFprzYTKN8EraoKY6E3LYOx15LgsQ/ufY/vITrm3jGekOPKu12tveq8WJO /q8as4RS5B2+DOPSfZs+X9yEzq2NOQoVx2QlEksLXW0Ufn+r1LOeRDjG1OHkhKALLNWh 7Wtw== X-Gm-Message-State: AOAM530NOxIFmd20eX8Oyl2G93h+MC9p3tlupHEnmVNb2zscaTMAztU4 TTPtFamnfW5dYOzISC0Uc5WXig== X-Google-Smtp-Source: ABdhPJwf9mdnK2ldlbFJ89Gp7ICZZlJoeyugDA0YNF0idT1dfs12KR4knXDFD3wj+Sh7mIvt9ShqvQ== X-Received: by 2002:a05:6214:21ac:: with SMTP id t12mr1263884qvc.123.1644409797997; Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id w13sm8052274qkb.106.2022.02.09.04.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:29:57 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nHm6e-001DJi-6l; Wed, 09 Feb 2022 08:29:56 -0400 Date: Wed, 9 Feb 2022 08:29:56 -0400 From: Jason Gunthorpe To: Christoph Hellwig Message-ID: <20220209122956.GI49147@ziepe.ca> References: <20220207063249.1833066-1-hch@lst.de> <20220207063249.1833066-8-hch@lst.de> <20220209062345.GB7739@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209062345.GB7739@lst.de> Subject: Re: [Nouveau] [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux NVDIMM , Ralph Campbell , Alistair Popple , Maling list - DRI developers , nouveau@lists.freedesktop.org, Felix Kuehling , "Pan, Xinhui" , Linux Kernel Mailing List , amd-gfx list , Christian =?utf-8?B?S8O2bmln?= , Linux MM , Ben Skeggs , Alex Deucher , Dan Williams , Logan Gunthorpe , Andrew Morton Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Wed, Feb 09, 2022 at 07:23:45AM +0100, Christoph Hellwig wrote: > On Tue, Feb 08, 2022 at 07:30:11PM -0800, Dan Williams wrote: > > Interesting. I had expected that to really fix the refcount problem > > that fs/dax.c would need to start taking real page references as pages > > were added to a mapping, just like page cache. > > I think we should do that eventually. But I think this series that > just attacks the device private type and extends to the device coherent > and p2p enhacements is a good first step to stop the proliferation of > the one off refcount and to allow to deal with the fsdax pages in another > more focuessed series. It is nice, but the other series are still impacted by the fsdax mess - they still stuff pages into ptes without proper refcounts and have to carry nonsense to dance around this problem. I certainly would be unhappy if the amd driver, for instance, gained the fsdax problem as well and started pushing 4k pages into PMDs. Jason