Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2539105lqo; Tue, 14 May 2024 01:31:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFDhgJW1YArm8YQ3I35ShyKUtbdzqqorgQknoHTzQu9l8kLp/w9emfRQDgqq3RfUII6Vojpi7ZJ0wkQZy5RsjXpkJfwzoHTfEACNwt+Q== X-Google-Smtp-Source: AGHT+IHh1JTi4m2fPhEm0vENKkSXK8DkYHs/9eUSLxMR5ouP5hMLVveW677VHT5/sMzIopYZtkWq X-Received: by 2002:a05:6a00:188d:b0:6ea:afd2:b1dc with SMTP id d2e1a72fcca58-6f4e037e8acmr11286861b3a.29.1715675517925; Tue, 14 May 2024 01:31:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715675517; cv=pass; d=google.com; s=arc-20160816; b=n/PquiVkNAok2W4FRuhZj2MT1eLcrqrSvDA8ft+nOwWFi4DfkI0NJt8+VKaNOyBuzx aSgfKbPmbCQm5CCjc+NQ6+l2BopLjrWumcD1w8bk1zX4uNtPOvo27b5LbaZdmpS/A4qZ 8Fi/d+shOeWUZQouY4HzCC4xdYMK80PuWx0XeiRV9i67hUsXjpjqBPkJOgOMlPPC/TCS 9wqY0GuJMHurYqnGlozjDZ6NKRFVEcc/f54P/S3Am6i5j/2JQ+Z7S+eLPj0q5Fua2oXT D2E6FZ9aUuvvc4OePuc2+/G8HUt8Aje3ZllHTqi5JN+/bEz46Mfd7HwlgukaMc+aj3VP C3pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:to:dkim-signature :dkim-signature:from; bh=wKAgEzIfgJRZRaemvfk+xP86DopN5RrKmXQomodN5HM=; fh=SlbWHRj+gLOrlvL53ns/nI+gY3x1SHKz8fepAhc9mLo=; b=WqM8uPUN+Ox6gWphDoNDnUOlW4IssfXElJCh3SgCgt169zuMqTTvbeBPYy8875BGn4 GInePX4/qEjs1RfeYJw6QiRQa32wkWFuzpkR0HD+hbKt9d8x4m4kgKkrrTJbKzRIxgTH yZO0Iwxj7neebe/XnNXhZmMcnnOYhCKUY5s6VuYEIW9X6grRZEW7Hidi0zT9LgyvVrpO ecVYGDOupBp7YIJVPFqGfZPpJOBz3g9EbQwKqYJ2ieBpp7mqbbxaXaknK4ptOk2Van5y LR6azmLOxInHUjq0US102ONbhmR+JlDIvxyJYDqUxI3hEthcYPqL0LuRvHUsWfukFQI0 lXrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sHlO3rCF; dkim=neutral (no key) header.i=@linutronix.de header.b=8whJTUXt; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-178438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412a4daa5si10665089a12.645.2024.05.14.01.31.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 01:31:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=sHlO3rCF; dkim=neutral (no key) header.i=@linutronix.de header.b=8whJTUXt; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-178438-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E53812841CA for ; Tue, 14 May 2024 08:31:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D64871CAB1; Tue, 14 May 2024 08:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sHlO3rCF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8whJTUXt" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB6A8AD58; Tue, 14 May 2024 08:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715675510; cv=none; b=WlN0jFgrvT4wLno3kFpSz81DVOqoQz1ha7Yw+b6uLAv1ybMgB/F6UwVoA60oxDXXchptd96FTOznoWEEtdsC2xZsxAi+bEAGuh4qmwco1mdoQloEDpTRtkc3QKHpyqgVX52iBmU9ejaCcOxVu1KGNoukXbiims2Abe2tDhEo04w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715675510; c=relaxed/simple; bh=D5V5Vlz28AnMUFbWtT4/nkFKtqlK/exeeNTnjhpKyBU=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=a1yfkl6DujylCgSwTjYPmf3twsf+qvCTuSDBjaC8r8d11xJNBNoEtwDe1f0PshJ1LKcjm4inasItELTj/dOO2h01OYlzJ2b9G1JtdE/HFvqX6w6ZG4wE9YbzCuioxMjL7Bb6Memj8LIhwHo2A8gIkQ+pJiYHx8ITNzkJfpumhg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sHlO3rCF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8whJTUXt; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715675506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wKAgEzIfgJRZRaemvfk+xP86DopN5RrKmXQomodN5HM=; b=sHlO3rCFQ4Qkcg9zLUrc1r3xbaegMu1etwy1Qj32tQiKFQXPGiOB2wUHdGuO6Fv1cbiwQd tUliSmnwwxk2x1aKJqaTgPJ7MKxfaWp/JTuU7AhnwpNBdhWEKXP77grTPzYt10CjswFq6H Wz1IdDAozSyxzm1kXM4xKWjl0ulkYr0b324ETbdLHtrP4tpeRqz04D26zcUXmEsKqb5m0t mZTTEp3ze3NXTAw//76cZe+oB69w6UI5B5MNKc0TQAByUdSA7+J1jw4qMvb/IxoGHvIuxD +HAnCk5+2wFUCblF0RQo1DI1p64an4Vu1savFC7cyJw5G/gVQC6Gi82iWAcyDQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715675506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wKAgEzIfgJRZRaemvfk+xP86DopN5RrKmXQomodN5HM=; b=8whJTUXtqUUAwcx0cnBHUPSkg8kBO2oOeTxYo4gRAFj3EVadHQTA9aF9oN/ef02Zvia4TB Hn2ZLLtCPMpBYTDw== To: Yury Norov , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Paul E. McKenney" , "Rafael J. Wysocki" , Anna-Maria Behnsen , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Frederic Weisbecker , Imran Khan , Ingo Molnar , Johannes Weiner , Juri Lelli , Leonardo Bras , Mel Gorman , Peter Zijlstra , Rik van Riel , Steven Rostedt , Tejun Heo , Valentin Schneider , Vincent Guittot , Waiman Long , Yury Norov , Zefan Li , cgroups@vger.kernel.org Subject: Re: [PATCH 6/6] tick/common: optimize cpumask_equal() usage In-Reply-To: <20240513220146.1461457-7-yury.norov@gmail.com> References: <20240513220146.1461457-1-yury.norov@gmail.com> <20240513220146.1461457-7-yury.norov@gmail.com> Date: Tue, 14 May 2024 10:31:46 +0200 Message-ID: <878r0cn6a5.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, May 13 2024 at 15:01, Yury Norov wrote: > Some functions in the file call cpumask_equal() with src1p == src2p. > We can obviously just skip comparison entirely in this case. > > This patch fixes cpumask_equal invocations when boot-test or LTP detect > such condition. Please write your changelogs in imperative mood. git grep 'This patch' Documentation/process/ Also please see Documentation/process/maintainer-tip.rst > Signed-off-by: Yury Norov > --- > kernel/time/tick-common.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c > index d88b13076b79..b31fef292833 100644 > --- a/kernel/time/tick-common.c > +++ b/kernel/time/tick-common.c > @@ -253,7 +253,8 @@ static void tick_setup_device(struct tick_device *td, > * When the device is not per cpu, pin the interrupt to the > * current cpu: > */ > - if (!cpumask_equal(newdev->cpumask, cpumask)) > + if (newdev->cpumask != cpumask && > + !cpumask_equal(newdev->cpumask, cpumask)) > irq_set_affinity(newdev->irq, cpumask); I'm not seeing the benefit. This is slow path setup code so the extra comparison does not really buy anything aside of malformatted line breaks. Thanks, tglx