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.5 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 07D51C4743C for ; Wed, 23 Jun 2021 07:57:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A69AF61185 for ; Wed, 23 Jun 2021 07:57:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A69AF61185 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 8AB828D0003; Wed, 23 Jun 2021 03:57:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 85C3F8D0002; Wed, 23 Jun 2021 03:57:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FD6F8D0003; Wed, 23 Jun 2021 03:57:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 347888D0002 for ; Wed, 23 Jun 2021 03:57:38 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EBAE723E51 for ; Wed, 23 Jun 2021 07:57:37 +0000 (UTC) X-FDA: 78284234154.21.4238FA3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id 97ABEC0201C0 for ; Wed, 23 Jun 2021 07:57:37 +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=+OQaTCtEgpBJhCqlBrl3HbRrw7HuZwYB4kM2GJKONbs=; b=nMa818gtVWtDVsd/dXVU++T/gl jEUbEmhJbYtMDObHDkCHRIwSwMp+Voj62CrPKj5L4FbC48XuzJu+oHQpzJ60khhhZuWpbfPLH7mIE pjHQtCaKlMAIk1A+o/sFBxDdYZLYJSVOOd19wsb8VxZH8LZTlwSwWRgEgMBJOpHU+gEKQQpTLrPKg D9UcTlqJn/Hr5M06OgQA2AVj/+XVvsz04X9cOH6yPh/6I9XTyEYjCQaqolsrz/PhaN2bB5QTk6ClP nG3ezdUPC5uLnvixhH03ehA6XAgvJhGo7ewlwtjj+L3yPLj74ZGAyjrkwxV75TN5Mz8gDnJAlRnyO txYemL4Q==; Received: from [2001:4bb8:188:3e21:6594:49:139:2b3f] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvxkp-00FBKv-H8; Wed, 23 Jun 2021 07:57:03 +0000 Date: Wed, 23 Jun 2021 09:56:58 +0200 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 02/46] mm: Add folio_rmapping() Message-ID: References: <20210622121551.3398730-1-willy@infradead.org> <20210622121551.3398730-3-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210622121551.3398730-3-willy@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 97ABEC0201C0 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=nMa818gt; spf=none (imf03.hostedemail.com: domain of BATV@casper.srs.infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=BATV@casper.srs.infradead.org; dmarc=none X-Stat-Signature: fwponmf6pc84jqzwnu8ia73h3irawi6y X-HE-Tag: 1624435057-183743 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: > +static inline void *folio_rmapping(struct folio *folio) This name, just like the old one is not exaclty descriptive. I guess the r stands for raw somehow? As a casual contributor to the fringes of the MM I would have no idea when to use it. All this of course also applies to the existing (__)page_rmapping, but maybe this is a good time to sort it out. > > struct anon_vma *page_anon_vma(struct page *page) > { > + struct folio *folio = page_folio(page); > + unsigned long mapping = (unsigned long)folio->mapping; > > if ((mapping & PAGE_MAPPING_FLAGS) != PAGE_MAPPING_ANON) > return NULL; > + return folio_rmapping(folio); It feelds kinda silly to not just open code folio_rmapping here given that we alredy went half the way.