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 E587EC46467 for ; Mon, 26 Dec 2022 12:23:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229436AbiLZMXl (ORCPT ); Mon, 26 Dec 2022 07:23:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbiLZMX2 (ORCPT ); Mon, 26 Dec 2022 07:23:28 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A4C1030; Mon, 26 Dec 2022 04:23:26 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F05AB1EC0513; Mon, 26 Dec 2022 13:23:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672057403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=hBp5bHSS6qXt/3eCZXTo0SXs4q3yzRvVOij9NcLj8MM=; b=Ljgg27pQVzHoyZox2bnY6q/q0vcKA8cS9hRe7S3euZ60uy7/B+gwxpFih23Ch0EIT0K4r9 e5SyxmcoKkbR5zKJSq22YMcuvIZW9DXlrOs0zoV0CONlVtxuMiqcf1xvOXcsYP1vmy6HKp m7i8DDzZ4r8SAwru3h+CMaE2scWnlaA= Date: Mon, 26 Dec 2022 13:23:18 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: 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: 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=utf-8 Content-Disposition: inline In-Reply-To: <20221207014933.8435-3-kirill.shutemov@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org 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; -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette