Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1688513pxj; Wed, 19 May 2021 11:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+AgRK8cL4pjqyMlHlpBE1QX9y72PL1yPjVnMjetmi9YcaG06ksoyISNJpzBIqUGb3rH0R X-Received: by 2002:a05:6402:188:: with SMTP id r8mr404522edv.75.1621449020587; Wed, 19 May 2021 11:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621449020; cv=none; d=google.com; s=arc-20160816; b=wov5r3OeY5dZeD87uDc1BlNMNhDraKFj82onn8rvvQOROJlrM3r8J2k5+urbUuCTFm eB0DSpabZNGoHj7Lsrh8AkXym+xE9ggON9XbkVBU+mmcjHXJHeCJwnPrTaX29YMkix+g Y8MDjIBxuGnoQXBISVJW27uMuV+5uh4yBJoXRo5CfX4nNPj2ObIMO4QVRgIpohugu7ZX ZsSGGaqd6nOlgyIQ78uTGyjVE6wM1z88iNVR7K5cJcgi9vhQ3P+glF+pwaGGx7xbZUbM saqGjSwCk1AbPAG1ANp7nsvvU1pRNAnyqzZCtsQLoAkahHn/jn8pXNHzbmukVLtKOnmX UEnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nwQB61PCdJJerfmFhe3lzFG5sVzdOBlAtF2vq2SQHdQ=; b=mar3A9f+Fr18yhpsYvccN5pzCXmwsEBObKMPVOxxAewoS5PHnlGXTJH9GGNQp2H2I5 WNQebLYU5lYhdKm1lG5/U3AY83a7Du19Bd4dvpx7xQ2fI0Plx9oX7HRIuSM8pHviDjIU Mk14Umjm54pBXoAI6MhTMoxTuFR4HG66ZmD1zBNnhMkF0G3OG/KqAzY0/QlTrGV7ar6X 4FoEh4n/P/Cv+sq5UDyC4ooEGjkQqOSgHGFVnLrJkYDoPQXkT+3hETHcyYmXx51PSeVa YXLasX5X4+EvtohAUcVQhdYFgYBNSiLrf9OmX5JAGgDAmgfK6r3wi7QJQNSjWeg+GvYj XGbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qHrbkPb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si356818ejs.331.2021.05.19.11.29.56; Wed, 19 May 2021 11:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qHrbkPb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351652AbhERSrl (ORCPT + 99 others); Tue, 18 May 2021 14:47:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234553AbhERSrk (ORCPT ); Tue, 18 May 2021 14:47:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CF5CC06175F; Tue, 18 May 2021 11:46:22 -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=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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.