Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp585769pxb; Tue, 19 Oct 2021 08:53:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8ecpGco3uUtdRKzD3I3lew15d9eLrN325RUoGyvuDQ8bpmOs2TbyKsUQCGOfkLZPhZZ/e X-Received: by 2002:a17:90a:5d89:: with SMTP id t9mr623188pji.21.1634658802309; Tue, 19 Oct 2021 08:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634658802; cv=none; d=google.com; s=arc-20160816; b=0tj1lpucPzT876yOp08f31Jkk4hgXmtTxigUhydNAUka1cm8ho8ZSlKq8guXjWGnRj XjZwW6sDRHli92nRnRZk4LnLs1/qoBjbUkEJj3NMrpn0eDDxC4MQNqhL/Rwg332n6tBy 5zqaA75FejhHocoe45Pzno+/ddbT1XXES9MWhNtGl0JBNmq6tSjCWng7WapcEbe7WLMF exNR95p1OH/qLkb1iOdZakyCGXfsJOXaF3EQa+osf/qsAtjsoSUlxMdX/5Wj62qQU+OY rEA2tV6HYhwbLYE+A+VCmHMaZ4R8aQs5d+mHv8qt2/Z+KuHLsSq4YnuqEjM0IcPgc03c sN6Q== 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:dkim-signature; bh=o/7RP25S1GW09p0QWgcOavQHuiJrMZ36lgHo059V56M=; b=glzw7hrdOeq78e+RvyF6A9QVwKtBSeOisSJQqU3itRnEQkPlKCHe6KNkzpIGQk7cgN ogxkK00KCvyM18GmnN03uStUJizJx2OR63uTHUOBIrjRSuPbKHAs16WMBcmR+RwlET+i ISY62As4S+by5GGErqDGv4ly/dMMhMSKUWtCyvOhSUYd2/1grJq8A/kv/jcT1vHTPKDK Tu+llolSgcdhupdEWUU+05poPM1+WIZHbH5cq87bpX0i2/Z6E72qTR/t9eX7882KloWZ ianIJsf8kVFgy8IRllogVVjVdG2oqyeJaiWSTOqT8pvvmayF8ZLTQb7jleRCyXbL6Tzv mC0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kxAK98ds; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nn7si4881707pjb.104.2021.10.19.08.53.09; Tue, 19 Oct 2021 08:53:22 -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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=kxAK98ds; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234351AbhJSPxg (ORCPT + 99 others); Tue, 19 Oct 2021 11:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233588AbhJSPxI (ORCPT ); Tue, 19 Oct 2021 11:53:08 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B70C06174E; Tue, 19 Oct 2021 08:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=o/7RP25S1GW09p0QWgcOavQHuiJrMZ36lgHo059V56M=; b=kxAK98dsJlnCofDf1Iu8vh1tS1 u7xng5tcJee5/FuXH6f6TZ5llbfZXOgUZS31ySN/R6PTXuN+zIHuToISfwbG6/9Duyw12JvgnP/8I GQ3cMYiw4i+GqO8uh4PWY5wokKwqUevM0xA8swDHHQuO17XGXksIKqJTOUIGNoJgMf3xs5RwA6leh iMCDKeekwrIYuPacl/CZHNhjAO00M91lNdcEmgZKNdRDCj/J0ZOcS0hTNkKX10hhmLYTGuFdCGXso JGk8rPn2tuaOZGE+0c8k/dL8bE0C9tflBAZpMvfahP1+JGvVB6acXS33eDtaoDV1rjiYzmLt+sMGm XtulvDaw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcrNc-00AnJE-1X; Tue, 19 Oct 2021 15:50:20 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 18D3B300288; Tue, 19 Oct 2021 17:50:18 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id F13BD2025616C; Tue, 19 Oct 2021 17:50:17 +0200 (CEST) Date: Tue, 19 Oct 2021 17:50:17 +0200 From: Peter Zijlstra To: Qian Cai Cc: gor@linux.ibm.com, jpoimboe@redhat.com, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, mingo@kernel.org, linux-kernel@vger.kernel.org, joe.lawrence@redhat.com, fweisbec@gmail.com, tglx@linutronix.de, hca@linux.ibm.com, svens@linux.ibm.com, sumanthk@linux.ibm.com, live-patching@vger.kernel.org, paulmck@kernel.org, rostedt@goodmis.org, x86@kernel.org Subject: Re: [PATCH v2 04/11] sched: Simplify wake_up_*idle*() Message-ID: References: <20210929151723.162004989@infradead.org> <20210929152428.769328779@infradead.org> <468c435b-192b-790b-2a2d-8f7ddfb4a061@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <468c435b-192b-790b-2a2d-8f7ddfb4a061@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 11:32:15AM -0400, Qian Cai wrote: > > > On 10/19/2021 5:10 AM, Peter Zijlstra wrote: > > Here, hows this then? > > > > --- > > diff --git a/kernel/smp.c b/kernel/smp.c > > index ad0b68a3a3d3..61ddc7a3bafa 100644 > > --- a/kernel/smp.c > > +++ b/kernel/smp.c > > @@ -1170,14 +1170,12 @@ void wake_up_all_idle_cpus(void) > > { > > int cpu; > > > > - cpus_read_lock(); > > - for_each_online_cpu(cpu) { > > - if (cpu == raw_smp_processor_id()) > > - continue; > > - > > - wake_up_if_idle(cpu); > > + for_each_cpu(cpu) { > > + preempt_disable(); > > + if (cpu != smp_processor_id() && cpu_online(cpu)) > > + wake_up_if_idle(cpu); > > + preempt_enable(); > > } > > - cpus_read_unlock(); > > } > > EXPORT_SYMBOL_GPL(wake_up_all_idle_cpus); > > This does not compile. > > kernel/smp.c:1173:18: error: macro "for_each_cpu" requires 2 arguments, but only 1 given Bah, for_each_possible_cpu(), lemme update the patch, I'm sure the robots will scream bloody murder on that too.