Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5935275rwd; Mon, 5 Jun 2023 10:26:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5c1INSWAnoeok2kblYuo7wxya87RSiUMxEoep2N8TkNUq3i/bS2Yd0gqJEu/dsIg8VKtyZ X-Received: by 2002:a05:6a20:7d96:b0:116:fd37:c924 with SMTP id v22-20020a056a207d9600b00116fd37c924mr2915228pzj.5.1685986016001; Mon, 05 Jun 2023 10:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685986015; cv=none; d=google.com; s=arc-20160816; b=IpShHoySQKeZ2ZDHH5FN3ca1520DS7xgaV7PWv1GuznR9w4oUGuUikjZVCh765jCwY uLfl3/mlXapt50ecXUejjARUUIRoXIuMHNiqRBLmDhy5Z9YWkSOW6+sTnI2y9BcUjI5M RAhNnJ9Y0ArKSXgiyrHjdjJ4bnmRQN1b9NkBDGmjcxu9Q+AmCNDkOG+w8J0L7Z60mZii zWOc7Klkq2E2xVlJ7eJbVTTFjHfGfKwLRqxFDZrv6bJqCjKFnkXp7TBL62ECv/fpNyr8 22LPUji5qU8LuAcRtL7eBAANymw6FYOoh9RQ7HxDImQIkeXfIjssTo4R+Gq7l3qB8qfr hU2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tC+nYe/yE1sZ87L6oPhi1CcNhNMcFsrkpUCndYS57sM=; b=zevJ4sFnHKjnA+M1TRc4E64aOoa+gFvxmsnzU9UtMRo5YRSRr0vUdhEEsoU/CusxNP z1+BHDvmEAUwQkl/PP1LLtmqEhcw0+Y2ey454XGWSh0MlQHm1IoQQhtPm05i+SuVScr2 51255kgyvGYwY6N6j1zhD/Tw7TaPEsXP9tuRsVAfVBhbAhC7vHzr240RCyEkraAtf6wU xYBdOfiB2H/+IjkpGxRuEmx9YPu4lba5u/WyDo5uy8arkNny3idjbKXy9/7Sf/KGRTBf U399JjwjTWTo+lDGSIyge3wcJ52wYPtBWnvuOIaeBTYdWa6LaLj8NfP1mQj+rfqccxZU CwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HTQrtoy7; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d190-20020a6336c7000000b00543c6a8c7c8si934677pga.583.2023.06.05.10.26.42; Mon, 05 Jun 2023 10:26:55 -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=@kernel.org header.s=k20201202 header.b=HTQrtoy7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233888AbjFEQfX (ORCPT + 99 others); Mon, 5 Jun 2023 12:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232106AbjFEQfT (ORCPT ); Mon, 5 Jun 2023 12:35:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E871CD; Mon, 5 Jun 2023 09:35:18 -0700 (PDT) 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 1B7C96139D; Mon, 5 Jun 2023 16:35:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB4E6C433A8; Mon, 5 Jun 2023 16:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685982917; bh=hyLqcZ6pOY8sxQnXV1QbLzvX42WT38l/ZT38FiyIQDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HTQrtoy7M6xNugBYnObcI+DjQAlS6WXzEUznVNjt3MvEuiFrizOMaBTSGjhvrrv+2 XNLi6B5u7aXkw2BkV+W4eJyNqX2bnfmSkgeRH1QndY8MiHqfCRPxaK1G9Y0XdLlOVs dA5aCBdOmlGeuwr3zmOa3lKkh8as5pLpQ1ZzYWP2I8WsOeYS5qE4QSNS0SqvuyGpxN Ra0vjjNmbaRaeaEo1sh36R/Q+JhnkAjWmNs4luPmVG0RqddTsHt/kbO0SDAjwvdtVq JNbNDRyETewk4DyPOgd0hUpEu95dkTKL9lObVm06G1SfuWtv1zmDh09AV00uDdlh9b L8oWXxDIQs7xA== From: Will Deacon To: Mark Rutland , Christophe JAILLET Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] perf/arm-cci: Slightly optimize cci_pmu_sync_counters() Date: Mon, 5 Jun 2023 17:35:02 +0100 Message-Id: <168597318508.3035025.8084369387360495178.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <88d4e20d595f771396e9d558c1587eb4494057db.1682022422.git.christophe.jaillet@wanadoo.fr> References: <88d4e20d595f771396e9d558c1587eb4494057db.1682022422.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, 20 Apr 2023 22:27:24 +0200, Christophe JAILLET wrote: > When the 'mask' bitmap is cleared, it is better to use its full maximum > size instead of only the needed size. > This lets the compiler optimize it because the size is now known at compile > time. HW_CNTRS_MAX is small (i.e. currently 9), so a call to memset() is > saved. > > Also, as 'mask' is local to the function, the non-atomic __set_bit() can > also safely be used here. > > [...] Applied to will (for-next/perf), thanks! [1/1] perf/arm-cci: Slightly optimize cci_pmu_sync_counters() https://git.kernel.org/will/c/f818947a0618 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev