From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19E237ED for ; Tue, 27 Dec 2022 03:18:55 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 04FA85C017F; Mon, 26 Dec 2022 22:18:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 26 Dec 2022 22:18:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1672111135; x=1672197535; bh=ZC YnFXki7u0QnJz1QySGzrUAbqVjjYGpn0e5VSFUlcU=; b=uoG1n4z6ni/BgxxNrY vZzqX3V55aD52nykAF8d0p3Enq5/dJVg51p/NpAKTqaBKcmz3mZepHsD+QN9GJr/ eBdTsdHBTXRgxIxuQwKWnoD/nwoVPvGU3nxttCcb/JZqX1R+GlSaCBf8NtBpfh84 3RbuD1i/x8nAWDcNeReA6tDh9Fhiu3jz38E/PhQ0GL8FWgTz2F9YEJRE992TF2K8 5HmpdIEQf3JFlB8ot9QXLFKZjh6rFPJtlPTQ1Me9HJgWWflUOhOcNrtAym25Ztb7 4Bh6o5DnjSrKPM5nYqwod1UgiE5L0t1BTKCU8kNoaExnKbO1kEGz9Tsb1ZCOSVN9 zJQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1672111135; x=1672197535; bh=ZCYnFXki7u0QnJz1QySGzrUAbqVj jYGpn0e5VSFUlcU=; b=iGyPAlCnrtxEeKou1rB2cG6xGfK79cbPLTyoyh2tkW0e beE9MwLgIwhpUi+wrfdWTNWObgzJQL2tC7D64Y64EJh2JcOk294pjIJmJjRbqQuT HP2XVI66zbtwq3xGQxu3nb9HyZ5m3mwnQBypyt3w/4i1FJcT9tlvBT3CsuPWFgTw 3NT8ogqH6qKqBf1KIpS4IJL9UtPxlM7vcHfPxBatj8XW7kIBHoLqI05lDWYicklJ 34YmpapDQOpLQJImPBOLPh+Nde/vnoPQlbMrwNtvOVPwVp5xythCfrBwfJIR+xLd Ag4NK5VITTSJhAzVLKz/6rNMx9NtDRlW4PfHUBXsNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrheelgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttddttddttddvnecuhfhrohhmpedfmfhirhhi lhhlucetrdcuufhhuhhtvghmohhvfdcuoehkihhrihhllhesshhhuhhtvghmohhvrdhnrg hmvgeqnecuggftrfgrthhtvghrnhephfeigefhtdefhedtfedthefghedutddvueehtedt tdehjeeukeejgeeuiedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepkhhirhhilhhlsehshhhuthgvmhhovhdrnhgrmhgv X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Dec 2022 22:18:53 -0500 (EST) Received: by box.shutemov.name (Postfix, from userid 1000) id 79BC7109CB8; Tue, 27 Dec 2022 06:18:49 +0300 (+03) Date: Tue, 27 Dec 2022 06:18:49 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: "Kirill A. Shutemov" , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCHv8 02/14] mm: Add support for unaccepted memory Message-ID: <20221227031849.7sqnnbnn7umhsa63@box.shutemov.name> References: <20221207014933.8435-1-kirill.shutemov@linux.intel.com> <20221207014933.8435-3-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Dec 26, 2022 at 01:23:18PM +0100, Borislav Petkov wrote: > On Wed, Dec 07, 2022 at 04:49:21AM +0300, Kirill A. Shutemov wrote: > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 6e60657875d3..6d597e833a73 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -450,6 +450,11 @@ EXPORT_SYMBOL(nr_online_nodes); > > > > int page_group_by_mobility_disabled __read_mostly; > > > > +#ifdef CONFIG_UNACCEPTED_MEMORY > > +/* Counts number of zones with unaccepted pages. */ > > +static DEFINE_STATIC_KEY_FALSE(unaccepted_pages); > > Then call it what it is: > > static DEFINE_STATIC_KEY_FALSE(zones_with_unaccepted_pages); > > so that when reading the code it is self-describing: > > if (!static_branch_unlikely(&zones_with_unaccepted_pages)) > return false; Looks good. Will fix for the next version. -- Kiryl Shutsemau / Kirill A. Shutemov