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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 3A951C433E7 for ; Thu, 15 Oct 2020 07:44:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 89C612224A for ; Thu, 15 Oct 2020 07:44:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89C612224A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 94D736B005C; Thu, 15 Oct 2020 03:44:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D57C6B0068; Thu, 15 Oct 2020 03:44:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79D006B006E; Thu, 15 Oct 2020 03:44:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id 494436B005C for ; Thu, 15 Oct 2020 03:44:29 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C9AD7180AD811 for ; Thu, 15 Oct 2020 07:44:28 +0000 (UTC) X-FDA: 77373372216.04.face50_240bf1c27212 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id AF030800A31A for ; Thu, 15 Oct 2020 07:44:28 +0000 (UTC) X-HE-Tag: face50_240bf1c27212 X-Filterd-Recvd-Size: 2229 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Thu, 15 Oct 2020 07:44:28 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 0DBFA68AFE; Thu, 15 Oct 2020 09:44:24 +0200 (CEST) Date: Thu, 15 Oct 2020 09:44:23 +0200 From: Christoph Hellwig 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 Subject: Re: [PATCH v2] mm/hmm: make device private reference counts zero based Message-ID: <20201015074423.GC14082@lst.de> References: <20201012174540.17328-1-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) 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 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.