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 ADF76C433F5 for ; Mon, 14 Feb 2022 20:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbiBNUp3 (ORCPT ); Mon, 14 Feb 2022 15:45:29 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:33008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbiBNUpH (ORCPT ); Mon, 14 Feb 2022 15:45:07 -0500 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFEA615C9F9; Mon, 14 Feb 2022 12:42:15 -0800 (PST) Received: by mail-ot1-f41.google.com with SMTP id j38-20020a9d1926000000b0059fa6de6c71so12387709ota.10; Mon, 14 Feb 2022 12:42:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fgZfyYfU/uI+Wmb25cwyau5T9MIs8WHUtmpE4RDI30w=; b=sTSeryVvbqBjBttDZO2RuUF2F0lLOOWGLUPNBCDQXSmWQD5uf3+DRtD2qdBw0HCrBC 3kqPM5BzAJrGfNABtL62RRaFRm4HyyMkvpCVsTFzVGBrqFx5FKAcbat57+1F7xNDI983 TamxxEg+Cqo7EWbedifaS53PFTSmP34kOx5KhpWLqLlDGu0tjMuin1IiMbqUTnwYTcab PwvUvUX4c4RK9jyjspej4mmT8lRuE9rQMjhw0GWM1B19sTNOnbfMGowdC5CdtVYoL71H ztEr0U+NHrb4W+PqVYbYsdutTXCMKXIyALMppZTjGBLNpa2c53ONrZpW/hOBzFN/wZ5K Uvhw== X-Gm-Message-State: AOAM530kV4DidXlGGTz0qB9uPiqQpGQ34V0ZbFNfiSpoAkzoTeWTh/DC jlx7Qadg030n3mziQAu3Ch6ndBf+dl2Y4L+AOsuRkal6 X-Google-Smtp-Source: ABdhPJz7A12UB0+8xTsSbw/O1RFK+7qXyXLo2zRb8niwiOIiKd06/kV5fhJSZwpoyfRqp+SHvgEbL/0HlYxaZDDGDYE= X-Received: by 2002:a25:180a:: with SMTP id 10mr694003yby.552.1644867916973; Mon, 14 Feb 2022 11:45:16 -0800 (PST) MIME-Version: 1.0 References: <20220210224933.379149-1-yury.norov@gmail.com> <20220210224933.379149-46-yury.norov@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 14 Feb 2022 20:45:06 +0100 Message-ID: Subject: Re: [PATCH 45/49] ACPI: replace nodes__weight with nodes_weight_ge for numa To: Yury Norov Cc: "Rafael J. Wysocki" , Andy Shevchenko , Rasmus Villemoes , Andrew Morton , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Greg Kroah-Hartman , Peter Zijlstra , David Laight , Joe Perches , Dennis Zhou , Emil Renner Berthing , Nicholas Piggin , Matti Vaittinen , Alexey Klimov , Linux Kernel Mailing List , Len Brown , Dan Williams , Huacai Chen , Vitaly Kuznetsov , Alison Schofield , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Mon, Feb 14, 2022 at 8:36 PM Yury Norov wrote: > > On Mon, Feb 14, 2022 at 08:18:27PM +0100, Rafael J. Wysocki wrote: > > On Fri, Feb 11, 2022 at 1:31 AM Yury Norov wrote: > > > > > > acpi_map_pxm_to_node() calls nodes_weight() to compare the weight > > > of nodemask with a given number. We can do it more efficiently with > > > nodes_weight_eq() because conditional nodes_weight may stop > > > traversing the nodemask earlier, as soon as condition is (or is not) > > > met. > > > > > > Signed-off-by: Yury Norov > > > --- > > > drivers/acpi/numa/srat.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c > > > index 3b818ab186be..fe7a7996f553 100644 > > > --- a/drivers/acpi/numa/srat.c > > > +++ b/drivers/acpi/numa/srat.c > > > @@ -67,7 +67,7 @@ int acpi_map_pxm_to_node(int pxm) > > > node = pxm_to_node_map[pxm]; > > > > > > if (node == NUMA_NO_NODE) { > > > - if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) > > > + if (nodes_weight_ge(nodes_found_map, MAX_NUMNODES)) > > > return NUMA_NO_NODE; > > > node = first_unset_node(nodes_found_map); > > > __acpi_map_pxm_to_node(pxm, node); > > > -- > > > > Applied as 5.18 material, thanks! > > It depends on patches 44 and 26. Are you applying them too? No, I'm not (I've only received this one directly). I'll drop this patch now and please feel free to add my ACK to it. Thanks!