Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2646470rwl; Mon, 26 Dec 2022 19:32:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLmo3hheJsq6on92Jxm4RG1qzSF2XXX2bibeGfetSMpvVBtmrHj0j+8iEBLpF9MCt2AMrZ X-Received: by 2002:aa7:d04f:0:b0:46f:97fb:1321 with SMTP id n15-20020aa7d04f000000b0046f97fb1321mr17322356edo.35.1672111943452; Mon, 26 Dec 2022 19:32:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672111943; cv=none; d=google.com; s=arc-20160816; b=m1+XdWdibFbaeBJA8SIIJbGiYFdgBMOtLR4GNDfXy1AkN0v/waDixSuuNtZbVNJQX8 OdZbmjFNPRfgqhJHYAtgpYUr/hqHWbvJxzXshsYe/2225NLZuSxyEmqRhKNpo5Ba6JJS EJ3htpw+wNu0xOVtQqZ6G88v6iBlyt1gzlON5nvGzhIm6PyWIvj9KA0Souemr7Gki7iy K2vrea73k86hp2zdIM560zQN28Qu+saBjTU4DsUFeiAnUV4NRyU7yn7atHOgSWN/a5ZE ogNE5Gc/+tbotfP10QGuWOUaz9IVCnkG7hmRLOmOv9RQyYhT+sRUxPT+oROdz7q1gcxL QMTg== 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:feedback-id :dkim-signature:dkim-signature; bh=ZCYnFXki7u0QnJz1QySGzrUAbqVjjYGpn0e5VSFUlcU=; b=fh5DOh7nHE9x0W4MV3YdDQ8z+4wIiN/sEo2sw/MKVQXN5Fh4Nrd5CEolArOX883Ynk yX+27Zxp0RUIqpVsT3J6ofeREcPUUbimqcupRzdXj+hEDylENUUf+9N2fTuHOuvoudBA zS0riHNcUskdlpgMEWCd4tXJzQIZ240G+N6obFtz4ehIF+G6OsKG3q737O/GlPIoMKOS ZUJy9A0b2AtfPOyo1d/fUbvF8Ttuqe9g0v9V77a3RuZtr3Ers+dW5cyHDN5WnBV5tnS4 2WNWqAjw/+fT3EUwlCsfTnSYT/yAkitrdNhYxP4WoHwN4JchNzA/QYyc9aNHddt9ETPg 2k8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm3 header.b=uoG1n4z6; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=iGyPAlCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx4-20020a05640222a400b004677a9c4b39si9159899edb.91.2022.12.26.19.32.08; Mon, 26 Dec 2022 19:32:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm3 header.b=uoG1n4z6; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=iGyPAlCn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbiL0DTE (ORCPT + 66 others); Mon, 26 Dec 2022 22:19:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbiL0DTC (ORCPT ); Mon, 26 Dec 2022 22:19:02 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBEEDEAF; Mon, 26 Dec 2022 19:18:57 -0800 (PST) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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