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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94086C433EF for ; Thu, 21 Apr 2022 19:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391958AbiDUTbf (ORCPT ); Thu, 21 Apr 2022 15:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383185AbiDUTbe (ORCPT ); Thu, 21 Apr 2022 15:31:34 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A824D61F for ; Thu, 21 Apr 2022 12:28:43 -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=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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.