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 66A6EC433ED for ; Tue, 18 May 2021 18:46:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E6D5760FEB for ; Tue, 18 May 2021 18:46:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6D5760FEB 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 3C6828E003C; Tue, 18 May 2021 14:46:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39CC98E002F; Tue, 18 May 2021 14:46:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 264EC8E003C; Tue, 18 May 2021 14:46:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id E75E48E002F for ; Tue, 18 May 2021 14:46:57 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7F5B73D05 for ; Tue, 18 May 2021 18:46:57 +0000 (UTC) X-FDA: 78155233674.11.E325CAF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id 08F8980193B8 for ; Tue, 18 May 2021 18:46:54 +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=nwQB61PCdJJerfmFhe3lzFG5sVzdOBlAtF2vq2SQHdQ=; b=qHrbkPb7HeA1rGif0FSFLD9xDy ytBSCOdjFx16YofUOdk798ddRAaxsnL9kdxiT3FVlw4sAN9LA6xbMTvr54BQm3Lin3GtI3ZMOURQe mQMe9kQQhXBUaR/Zl3VQS9/gcHKZ4D3zKbSJAYyeQLRr6JqisgMwZrFYw3D0/m7tQet+AOOxLGGVO 5mFYISrv2hQTzM5YNPZGiDz5U5tsIgh8ilT1KCYkpLx19c9q2t/TGa0Os4kk03+dP5U3Tw5Jr799I kQzleeOuiEWvDh4fW1gS8sutu6za/Q3EknBc7vukfq+UsyOPGNejBr6WkGQ8QENcxUobdxyPu+UK/ G6fiNP1Q==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lj4ii-00EGFe-F9; Tue, 18 May 2021 18:45:42 +0000 Date: Tue, 18 May 2021 19:45:32 +0100 From: Matthew Wilcox To: akpm@linux-foundation.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Jeff Layton Subject: Re: [PATCH v10 16/33] mm: Add folio_mapcount Message-ID: References: <20210511214735.1836149-1-willy@infradead.org> <20210511214735.1836149-17-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511214735.1836149-17-willy@infradead.org> Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=qHrbkPb7; spf=none (imf27.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 08F8980193B8 X-Stat-Signature: gg9tm8b6uemcmeiqjmn7kwwoz3jrx3pt X-HE-Tag: 1621363614-850863 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 Tue, May 11, 2021 at 10:47:18PM +0100, Matthew Wilcox (Oracle) wrote: > This is the folio equivalent of page_mapcount(). [...] > > +/** > + * folio_mapcount - The number of mappings of this folio. > + * @folio: The folio. > + * > + * The result includes the number of times any of the pages in the > + * folio are mapped to userspace. I thought it did, but it doesn't. It returns the number of times the head/base page of this folio is mapped into userspace, which is not a terribly useful concept. I suspect this should call total_mapcount() instead. Looking through the complete set of patches, it's only used in debugging code (unaccount_page_cache_page() and dump_page()). I'm going to withdraw this patch from the next submission until I've had the chance to think about it some more.