Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2966731pxf; Sun, 21 Mar 2021 13:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIHlH3QBeFl5Au2VVXoNLyGB+p5hA//jrFd4Jfdjyo485rIOp1KTZk4EJcgScEGKWRGmWj X-Received: by 2002:aa7:c907:: with SMTP id b7mr22473381edt.37.1616358045659; Sun, 21 Mar 2021 13:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616358045; cv=none; d=google.com; s=arc-20160816; b=hngZzLTjpHRIlFAQd7bURjin+cRk/ntPb2HdYhQuKCp5t2JatG7fvyAxXwfNQgUICs V/DrdKRGNcqMvReup5gX7Zu3HpAX60k6dnvc227Y3wrWKKKxj/VgxMQ0o8ZXHiHhgXhW +c0oZyl+Bqxp2W6DRf9wzMRUjyD6QhNJFBPUyjBitLTpKZjgXur422trrgpL4VFu222j R2abYTwjiKK1VdprIpMfy6zKn9mBh2g1a8b27xA7W9k7BwTzhX1Ve1slOhGPMPNwTuqc XUY4CoiSlhCh+LS/ZhxzxqNU/d7VZJff4TGhnqLjBgwSBH2StZvTNDUZR/Sw/xmy9Kq6 Lnow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NoYT33/URJuKVRhzdU0iwnak/ytyGULkagUYuLvzbSo=; b=gEp6Mes6xpr9bPBexsgnDAPaFpL6yYnj/CmLfYfqdsw3RbE+h7pIUY1tyTL9hsKjIf Lqf4GWOiZA8MtIv0qWJmigi5ay4VwRlmtolZtKMP5aXf8PtV/5Lrhg3NWWrWjEmTLR+t A345WAmgHGEmYLk7dl9UcAZVpAQ0aVPu5ZdwGiqvgZ0gXzABBL+Ku64iJu9F1EnE5EFL XYsbE6nMInv5FAmWAUCMVxM0XAyWrj7mfS90ScFrzuFYZpzb4klc3JYXVylgkyb36K47 E4IsB23pJGod7TW69nPGFSEqFaIF6hU/JMLOsHEnvI7u/Wn+TAc4U1Wg3TN+K7ePD1cB iv4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga37si9909624ejc.4.2021.03.21.13.19.59; Sun, 21 Mar 2021 13:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbhCUTa7 (ORCPT + 99 others); Sun, 21 Mar 2021 15:30:59 -0400 Received: from foss.arm.com ([217.140.110.172]:43418 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhCUTam (ORCPT ); Sun, 21 Mar 2021 15:30:42 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C87E0ED1; Sun, 21 Mar 2021 12:30:41 -0700 (PDT) Received: from e107158-lin (unknown [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E0A383F718; Sun, 21 Mar 2021 12:30:39 -0700 (PDT) Date: Sun, 21 Mar 2021 19:30:37 +0000 From: Qais Yousef To: Peter Zijlstra Cc: valentin.schneider@arm.com, tglx@linutronix.de, mingo@kernel.org, bigeasy@linutronix.de, swood@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] cpumask: Introduce DYING mask Message-ID: <20210321193037.7o3mqcmwjthbos7n@e107158-lin> References: <20210310145258.899619710@infradead.org> <20210310150109.151441252@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210310150109.151441252@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/21 15:53, Peter Zijlstra wrote: > --- a/kernel/cpu.c > +++ b/kernel/cpu.c > @@ -160,6 +160,9 @@ static int cpuhp_invoke_callback(unsigne > int (*cb)(unsigned int cpu); > int ret, cnt; > > + if (bringup != !cpu_dying(cpu)) nit: this condition is hard to read > + set_cpu_dying(cpu, !bringup); since cpu_dying() will do cpumask_test_cpu(), are we saving much if we unconditionally call set_cpu_dying(cpu, !bringup) which performs cpumask_{set, clear}_cpu()? > + > if (st->fail == state) { > st->fail = CPUHP_INVALID; > return -EAGAIN; Thanks -- Qais yousef