Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp25429iob; Wed, 11 May 2022 08:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPEE5c4y11R5k+KG45hxQIqf3MZiFVJc1y4mkuaHMoVJRwDJw+f9OTLVpIoyNgYdm08iRN X-Received: by 2002:a17:902:d58d:b0:15f:3cbf:f2bf with SMTP id k13-20020a170902d58d00b0015f3cbff2bfmr1092951plh.46.1652284434646; Wed, 11 May 2022 08:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652284434; cv=none; d=google.com; s=arc-20160816; b=WDDCwgk3ssayVs4u/vUs8Zb/g6Go4OkQXm4dFbCs2XJNCqoT7Z3BuLQrljW3k9o4ca +XVrAgLiYqfJJ1yjcY8hicGae+y+khdEyFFiBVyEtzThGWG4bF3rvaCw35WK3Q/tqbA9 iMhumEKGNB6Vv19PKKfA4ijdEZW9kO1a7/8B2NVs2t9YfSLsON9BgITMXfTlMuXows/1 y8FklcVeGOaSRv/iEBtLhh3rxIimkC8vzS2pcxjbwydzLpq5Y29jniDsy9EXZgDWLvO1 TBw8XD1NSELW6On5qC8Sy3T2b/nMIfJ1MVnrsHOwkBKSPGLX9BN37revUYdYNH8FJmLs KIPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=f8gIOAVSb9Lnd1j0nle/z769EEvoHbIW5mPnMFdg2vU=; b=SramoNQJeIG9OBZZifdrwnU9yk5XR4D5mEdHDOoqwpxVD1jDMhP37Ozdmwp69jvKQI D/Co+gqeG+13jnijbdH1UuphMlkE6sNBLXfiTvgFF7xXupByh5GH9oJGbDhABH8uBEJo fLNxEUOtaIzbl+UQYkMSWV1AAOj5aS9zrC+c9DMnnrlJMWWAju6wFVMUmyPRAteLDrhw GMSdo016CGBk01HTQ1sxNlm9sYw4lAPOoH9IQoZsIoggFd0M3vFmYy6w6bi4jscLJsXv 5iG4BuNGTRWIR2RNQuYypLbYVKoYkxApKJR6qKMP+2auXaj2CRJD8+a9Td6leOuFMBGK hdCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="WZl1nd/L"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=y7rJtIcF; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y32-20020a056a00182000b0050d8195100bsi3301758pfa.7.2022.05.11.08.53.40; Wed, 11 May 2022 08:53:54 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b="WZl1nd/L"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=y7rJtIcF; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbiEKJsR (ORCPT + 99 others); Wed, 11 May 2022 05:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234141AbiEKJsC (ORCPT ); Wed, 11 May 2022 05:48:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCF73377FF for ; Wed, 11 May 2022 02:47:59 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1652262478; 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: in-reply-to:in-reply-to:references:references; bh=f8gIOAVSb9Lnd1j0nle/z769EEvoHbIW5mPnMFdg2vU=; b=WZl1nd/LxNLdWjEf3AtHQMvb7D/wT0fsQURBIWXV/5D1BfEP3s4HsUNyF3uTBUA5uF/YSm +Se/8M9xQjgs0x+YwE2kgvp6IfH11K/e/bHt35fceqWu+xDYY8D3vn5805QNy5SB8W/sFe s6iCWsKFJpNMPDBizBKDPhyTAP52SWBo3vr3AyCwi6S7jsHdb/XeqWrBCBwOT47dKe8l0X z3bj5T69XCrxq+HVIw6Kq+u6iSkPSjDIEPOuEtG5PLzUh2zri5AxhwcY2DO3MQN7/Q2AEl Gac/kx1SJltxRedv4GYC7wJWry+o97tAwhMF5IAMlyhHonuyBexFWvcpIgW+wg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1652262478; 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: in-reply-to:in-reply-to:references:references; bh=f8gIOAVSb9Lnd1j0nle/z769EEvoHbIW5mPnMFdg2vU=; b=y7rJtIcFJKbZDVPxCMswt74OasNVSo/j3/EyYX9CVr+mqdtw0MQOrLj2EIWGQeM8KW/xlU zMpUnm/Dv1yBNOBA== To: Yury Norov , Andy Shevchenko , David Laight , Greg Kroah-Hartman , Joe Perches , Julia Lawall , =?utf-8?Q?Micha=C5=82_Miros=C5=82aw?= , Nicholas Piggin , Nicolas Palix , Peter Zijlstra , Rasmus Villemoes , Matti Vaittinen , linux-kernel@vger.kernel.org Cc: Yury Norov , Balbir Singh , Boris Ostrovsky , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Huang Rui , Ingo Molnar , "Paul E . McKenney" , "Rafael J . Wysocki" , Sean Christopherson , Tim Chen , x86@kernel.org Subject: Re: [PATCH 13/22] x86: smp: move cpumask_weight() out of for-loop in remove_siblinginfo In-Reply-To: <20220510154750.212913-14-yury.norov@gmail.com> References: <20220510154750.212913-1-yury.norov@gmail.com> <20220510154750.212913-14-yury.norov@gmail.com> Date: Wed, 11 May 2022 11:47:57 +0200 Message-ID: <87k0ash036.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, May 10 2022 at 08:47, Yury Norov wrote: Subject: x86: smp: move cpumask_weight() out of for-loop in remove_siblinginfo Can you please format this according to https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-submission-notes > Because argument of the function is constant inside for_each_cpu() > loop, the cpumask_weight() does the same work O(NR_CPUS) times, while > it may be calculated only once. > > This patch moves cpumask_weight() out of the loop and replaces it Ditto. Thanks, tglx