From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Thu, 15 Oct 2020 07:44:23 +0000 Subject: Re: [PATCH v2] mm/hmm: make device private reference counts zero based Message-Id: <20201015074423.GC14082@lst.de> List-Id: References: <20201012174540.17328-1-rcampbell@nvidia.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Williams Cc: Ralph Campbell , Linux MM , kvm-ppc@vger.kernel.org, nouveau@lists.freedesktop.org, Linux Kernel Mailing List , Ira Weiny , Matthew Wilcox , Jerome Glisse , John Hubbard , Alistair Popple , Christoph Hellwig , Jason Gunthorpe , Zi Yan , "Kirill A . Shutemov" , Yang Shi , Paul Mackerras , Ben Skeggs , Andrew Morton On Mon, Oct 12, 2020 at 02:14:07PM -0700, Dan Williams wrote: > > ZONE_DEVICE struct pages have an extra reference count that complicates the > > code for put_page() and several places in the kernel that need to check the > > reference count to see that a page is not being used (gup, compaction, > > migration, etc.). Clean up the code so the reference count doesn't need to > > be treated specially for device private pages, leaving DAX as still being > > a special case. > > Please no half-step to removing the special casing... Agreed. I really like where the refcount changes are heading, but I don't think this half-step is helpful.