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 B06CCC433EF for ; Tue, 15 Feb 2022 23:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244803AbiBOXTV (ORCPT ); Tue, 15 Feb 2022 18:19:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244794AbiBOXTT (ORCPT ); Tue, 15 Feb 2022 18:19:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F40FC1C9E for ; Tue, 15 Feb 2022 15:19:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BBDFF6157E for ; Tue, 15 Feb 2022 23:19:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 089C3C340F3; Tue, 15 Feb 2022 23:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644967148; bh=J5G/TINlmHc23UCskGemF0ZvApVh+Wj1ZO+IX7y1D3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uGrdR1E/KH+AeDsVyrFHW8Lf66dTFhArd0d35Ld3UN3ACRj3SlNDq2OKDfjocxvKG 5sep/hL+eJr5/xwLyUYV71xQpXCAURWd4gtYKcjo75S0J6Kuz05rvfcb6r5MVtjDai ejk49b09sIg+W7qRjl67rMDSm5EoZUJoTWVMkKTIKnjlu467rBYg8d64s2KHOyi7c5 OaK0TWhkveLDH3OIBs4sdXDgOQBXQLJAoUc3lC64r30xfDwsu7jFgTYzuBhvmuBIAP MfcEeJ2NPJrxAqcKSyAETtK3EXCblaTs2sVUKHigRcfrgGOrnxBv6xvO4MuD3sytFQ SKTeNGvTixWYw== From: Will Deacon To: Peter Zijlstra , Greg Kroah-Hartman , Andrew Morton , David Laight , Andy Shevchenko , Alexey Klimov , Yury Norov , Matti Vaittinen , Dennis Zhou , Joe Perches , linux-kernel@vger.kernel.org, Rasmus Villemoes , Emil Renner Berthing , Nicholas Piggin , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon Subject: Re: [PATCH v4 00/49] bitmap: optimize bitmap_weight() usage Date: Tue, 15 Feb 2022 23:18:33 +0000 Message-Id: <164493593823.3069697.15308947342224952378.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220210224933.379149-1-yury.norov@gmail.com> References: <20220210224933.379149-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Feb 2022 14:48:44 -0800, Yury Norov wrote: > In many cases people use bitmap_weight()-based functions to compare > the result against a number of expression: > > if (cpumask_weight(mask) > 1) > do_something(); > > This may take considerable amount of time on many-cpus machines because > cpumask_weight() will traverse every word of underlying cpumask > unconditionally. > > [...] Applied to will (for-next/perf), thanks! [12/49] perf: replace bitmap_weight with bitmap_empty where appropriate https://git.kernel.org/will/c/95ed57c73bbc Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev