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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5017DC433F5 for ; Thu, 21 Apr 2022 19:28:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9BFCB6B0072; Thu, 21 Apr 2022 15:28:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 96EDC6B0073; Thu, 21 Apr 2022 15:28:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8362E6B007D; Thu, 21 Apr 2022 15:28:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 739856B0072 for ; Thu, 21 Apr 2022 15:28:47 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 416EC2343F for ; Thu, 21 Apr 2022 19:28:47 +0000 (UTC) X-FDA: 79381873494.14.D9B17AC Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf22.hostedemail.com (Postfix) with ESMTP id ABAF1C0023 for ; Thu, 21 Apr 2022 19:28:45 +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=9IfvoAG120Xgb0ZbzjsvhpbJeEGLGitWg1JM66E4oo8=; b=X69r0Etcj/6B3+sy90BSY4NKEL 7ldBpId57FaQpleHIc5wnOp9OSVRPI8jxXpzTq92xcXe0m1O6x6dZsEHyo3NNJviVfUZe22gHrdpo TkwQix6AKUtTV5h5hjmf8sm5jszsMWL7C3pmc9cZLakFf8c8ovtKxDqaA6TN9EgaEeWL699gqsXPl mgHV8FK3GJU7BxGum4X82lLs3rT+ydvbo2/IH5+LVaJ4SZ54lDRm8vjOhCurZxj6BQ+cM1rcVYjP9 /5iUvIXT4fEJ4yTJVbrsKtBaSMP5IbLkJN3aNMWksyqjAlmrCDGldgJ+derwVK0WCoukgLMpSrzMw ivpXRSvQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhcTg-005Nww-42; Thu, 21 Apr 2022 19:28:32 +0000 Date: Thu, 21 Apr 2022 20:28:32 +0100 From: Matthew Wilcox To: Nico Pache Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alexander Viro , Andrew Morton , Nicholas Piggin , Logan Gunthorpe , Hari Bathini , "Aneesh Kumar K.V" , Yang Shi , Miaohe Lin , William Kucharski , Hugh Dickins Subject: Re: [RFC 1/3] mm: change vma_is_anonymous to vma_is_private_anon Message-ID: References: <20220421190533.1601879-1-npache@redhat.com> <20220421190533.1601879-2-npache@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220421190533.1601879-2-npache@redhat.com> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: ABAF1C0023 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=X69r0Etc; dmarc=none; spf=none (imf22.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: hbsmtpc7p8jwpw6xxwobnqhbcrsw5cit X-HE-Tag: 1650569325-997332 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 Thu, Apr 21, 2022 at 03:05:31PM -0400, Nico Pache wrote: > The vma_is_anonymous function isn't fully indicative of what it checks. > > Without having full knowledge of the mmap process, one may incorrectly > assume this covers all types of anonymous memory; which is not the case. Is your complaint that anonymous memory can also be found in file VMAs that were mapped with MAP_PRIVATE? ie COWed pages? I don't think renaming this function is appropriate. It's whether the VMA is anonymous, not whether the VMA can contain anonymous pages.