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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D3B4C433EF for ; Mon, 18 Jul 2022 21:35:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C91766B0087; Mon, 18 Jul 2022 17:35:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C683A8E0001; Mon, 18 Jul 2022 17:35:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B58236B0089; Mon, 18 Jul 2022 17:35:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A74A96B0087 for ; Mon, 18 Jul 2022 17:35:58 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 7AE6C1205C6 for ; Mon, 18 Jul 2022 21:35:58 +0000 (UTC) X-FDA: 79701528396.17.CB62EFA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id 1FFC1A008F for ; Mon, 18 Jul 2022 21:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=b2+fqHm2d7st+up4McCVrJnq2E33gaO/uKbxkL5xitM=; b=FnaaKsRtymCNI9bTlQJE4Yfs7A 6MmBBm2cnAvkBlHNWOOWv8sIFw018fF0xtnLmlOsf3VqMp3CQduwqgJwrKo1Y0A8R49pg8KR07Biy k7PBcOMcA1z6OS+yFTggRDgfQSc4V+k7Yp32yayvWFO18x2hCRJQIct/qBP0XDcyGgmnNqp6/xi3B rRpmB8OJJbiQ9o/tQXCQIFDSijX4oUEGwqn51hjy5bY2Mt2HxIVs0JJGPWQUQwuDt6+LmeFgCdoVU +2QPjphKTGv/mqSCkKRH7uGC8cN9NBEKcvGD1m9v2GVCznS2lFMFvG+oHCmB5gW+DV8G5a/4lTalj rjQ8tanA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDYOy-00D3GZ-3i; Mon, 18 Jul 2022 21:35:40 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id B85DF9802A7; Mon, 18 Jul 2022 23:35:39 +0200 (CEST) Date: Mon, 18 Jul 2022 23:35:39 +0200 From: Peter Zijlstra To: Yury Norov Cc: linux-kernel@vger.kernel.org, Alexander Lobakin , Alexei Starovoitov , Alexey Klimov , Andrew Morton , Andrii Nakryiko , Andy Shevchenko , Ben Segall , Christoph Lameter , Dan Williams , Daniel Borkmann , Daniel Bristot de Oliveira , Dennis Zhou , Dietmar Eggemann , Eric Dumazet , Frederic Weisbecker , Guenter Roeck , Ingo Molnar , Isabella Basso , John Fastabend , Josh Poimboeuf , Juergen Gross , Juri Lelli , KP Singh , Kees Cook , Martin KaFai Lau , Mel Gorman , Miroslav Benes , Nathan Chancellor , "Paul E . McKenney" , Randy Dunlap , Rasmus Villemoes , Sebastian Andrzej Siewior , Song Liu , Steven Rostedt , Tejun Heo , Thomas Gleixner , Valentin Schneider , Vincent Guittot , Vlastimil Babka , Yonghong Song , linux-mm@kvack.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH 13/16] time: optimize tick_setup_device() Message-ID: References: <20220718192844.1805158-1-yury.norov@gmail.com> <20220718192844.1805158-14-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220718192844.1805158-14-yury.norov@gmail.com> ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=FnaaKsRt; dmarc=none; spf=none (imf25.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658180158; a=rsa-sha256; cv=none; b=BPK907w6DVKE3YyrJ4GqvaOlBdcGCEvidmRRVE9lf5rvggk+WMI6MPEYnOsIWJyJcN6XqA W8OPxGPj3RPphmsRdKo05IuMaHfzx0n4P1OZhxhCA6Gwn9JmyAFygwMet/2nodhScVNVLN BC8EH1ZnR3WoOpnt11osNrA1BQZ83sg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658180158; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=b2+fqHm2d7st+up4McCVrJnq2E33gaO/uKbxkL5xitM=; b=SIoA9DPY2kJUfNP4VWphHWtboQCHWZnIuQ9ky02UzCeWko2KRwZhgX3o1ff/iLvhmVKaeb HcEaV4oVSgI+IyOyTj8tY+JtchlL8l1w6uwDrfa9FMZ65VXR2G8agj9EgyDW1FkevGFyA3 iiSXliZ4UnIJQk87RIdA/xKpjVZ6LNI= X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 1FFC1A008F Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=FnaaKsRt; dmarc=none; spf=none (imf25.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org X-Stat-Signature: 9m7k7oor687n135i71zcb7xyj5dezyq3 X-HE-Tag: 1658180157-310602 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jul 18, 2022 at 12:28:41PM -0700, Yury Norov wrote: > kernel/time/tick-common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c > index 7205f76f8d10..7b2da8ef09ef 100644 > --- a/kernel/time/tick-common.c > +++ b/kernel/time/tick-common.c > @@ -255,7 +255,7 @@ 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); This is again making a slow path harder to read for now benefit.