Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1825700rwl; Mon, 26 Dec 2022 05:23:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXuj90R2qzQykBd5mn04JMrQP8HxfoCPGEdeMbvtmfImQFX7s7tLoPt/VPhCZmFoZiQxFVEB X-Received: by 2002:aa7:c30b:0:b0:47b:a6e:6ba5 with SMTP id l11-20020aa7c30b000000b0047b0a6e6ba5mr15374982edq.12.1672061027845; Mon, 26 Dec 2022 05:23:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672061027; cv=none; d=google.com; s=arc-20160816; b=p1TuuTz/vTd2Ad/zI0PXRprudQMrvDoVUjRrvb+K43tnYUhTJ4DQWuv1ACiGjZ5Mnw bX9R8QAe/nHXz5b8CaGEPAyujPmiAaOu0YfX0MYeSVvA0dhDzErlqkndCiL+lr7jw0G/ ytsLfUq6eKqhFw5zv0KCGV2IfDCQjwl+RS3XIjxRrMgsy1bb4c/ADq2VzF9hw/apY1YR 7QQnUBS9ZtQI+WT3hi489XAr5OEirPP0gx4rBSUmZZG8O6tJQsEKJs8/W8RCVWfUcURD 6d0UG/PT7eJl8UB639pyh4uH7IRALP4V1XKm6mum3BwtKx+nOkyFPPhAQPnckXJpzyQy vV6w== 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:dkim-signature; bh=hBp5bHSS6qXt/3eCZXTo0SXs4q3yzRvVOij9NcLj8MM=; b=xUsU362UqrfwZ8G1tteI08EJ8R3xzhfC5incLqt9TVqz8fHfQwuVoDeaRqSOGyes2o 5lROcmMHRN39fMl0b+Xs0tF8rVhMxilWRKcnKTPJQZ6BaVz0cqaKtFPd3l1zPL/1CD3N ZJ//C+54/jaGZv5lHA1FVX7nr0eqqG64QOvLlhWjoExY4e/iSWYOgHgn2/YTuGIghXbX lA9QdZIaA1CvOpQHl+93aRDKti4czdbUnHnUd1ei0lOpWI3FNC06n47cHcK+3JGmy8zW qKdIhd74tJqhGvysQ8oS1BJR9B6iHQ/27BQC8yaUkLsD6pIjw1dXJxF+2IzxW65pB5c6 kL8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Ljgg27pQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a056402440600b00477480de0basi9635666eda.288.2022.12.26.05.23.32; Mon, 26 Dec 2022 05:23:47 -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=@alien8.de header.s=dkim header.b=Ljgg27pQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbiLZMXn (ORCPT + 66 others); Mon, 26 Dec 2022 07:23:43 -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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 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