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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 987E1C2D0E0 for ; Tue, 15 Sep 2020 16:30:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03AD120872 for ; Tue, 15 Sep 2020 16:30:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FhtjCj8a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03AD120872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3EC6A900066; Tue, 15 Sep 2020 12:30:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39ADC90000E; Tue, 15 Sep 2020 12:30:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23BB1900066; Tue, 15 Sep 2020 12:30:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 0734190000E for ; Tue, 15 Sep 2020 12:30:08 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BC83A8249980 for ; Tue, 15 Sep 2020 16:30:07 +0000 (UTC) X-FDA: 77265832854.25.tub68_5014bf427112 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 56C3F1804E3A8 for ; Tue, 15 Sep 2020 16:30:07 +0000 (UTC) X-HE-Tag: tub68_5014bf427112 X-Filterd-Recvd-Size: 2998 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Sep 2020 16:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=h6yEPMjFBbOeI1nHQxJaBbzOjrvp/dwKRkVIewBPplw=; b=FhtjCj8afEHB9EsdL/O1b5MO2/ OK+N3R3WT5KgfOVCwmnc4a/n2dIKiQ+/ejDpcIeJqi74/LSP+Gxn40SlUAvdZt7qDk0x/I7C7w7Ju AU9ZCb42uRy0emXWZNFN8nicvRtWmp8LJ+9zQOZ9IigttQPMYeLnHrp3vIkvVEL3Ef4v5NWOC5D9U stSRHSZTECQC2/tBVGL+C81bj3RqCLcB51xuge5sg1Dz7j2rGWv96p2WryvB9TkexpZTDrTeU8aGE QoY/NV7HTkDRAwMNETwcmEuHQsF+nv10JLN9MO8biw9/i7BcL7QTtszMrTYStLcdfTttoZH/dX9Re pb+bIffw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIDq8-0005vd-4q; Tue, 15 Sep 2020 16:29:56 +0000 Date: Tue, 15 Sep 2020 17:29:56 +0100 From: Christoph Hellwig To: Ralph Campbell Cc: Dan Williams , 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 , Bharata B Rao , Zi Yan , "Kirill A . Shutemov" , Yang Shi , Paul Mackerras , Ben Skeggs , Andrew Morton Subject: Re: [PATCH] mm: remove extra ZONE_DEVICE struct page refcount Message-ID: <20200915162956.GA21990@infradead.org> References: <20200914224509.17699-1-rcampbell@nvidia.com> <10b4b85c-f1e9-b6b5-74cd-6190ee0aca5d@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10b4b85c-f1e9-b6b5-74cd-6190ee0aca5d@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: 56C3F1804E3A8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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, Sep 14, 2020 at 04:53:25PM -0700, Ralph Campbell wrote: > Since set_page_refcounted() is defined in mm_interal.h I would have to > move the definition to someplace like page_ref.h or have the drivers > cal init_page_count() or set_page_count() since get_page() calls > VM_BUG_ON_PAGE() if refcount == 0. > I'll move set_page_refcounted() since that is what the page allocator > uses and seems named for the purpose. I don't think any of the three ->page_free instances even cares about the page refcount.