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 5FD97C43461 for ; Tue, 15 Sep 2020 17:19:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFDE02193E for ; Tue, 15 Sep 2020 17:19:34 +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" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727834AbgIORSp (ORCPT ); Tue, 15 Sep 2020 13:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727431AbgIOQaH (ORCPT ); Tue, 15 Sep 2020 12:30:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A2AC06178A; Tue, 15 Sep 2020 09:30:06 -0700 (PDT) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.