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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A37C433EF for ; Tue, 19 Oct 2021 15:32:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BDB160FC3 for ; Tue, 19 Oct 2021 15:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232797AbhJSPeh (ORCPT ); Tue, 19 Oct 2021 11:34:37 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:43056 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbhJSPec (ORCPT ); Tue, 19 Oct 2021 11:34:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1634657540; x=1666193540; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=9k1DtCLnVq8onijKayfDBwbvoGq8mjdO5uaTCO13EY8=; b=VUdr2YWzIRcr4NgjiCT6UTpG9D9T4JQkzyPL9zIWBVS4KxKSLqFq6+mZ qetZ40vx3+mL0zO9J1hP3fFHSlFW1SONETbo5SIkiltcuiiNYQmF+0WG6 +rPSNWrbxg2CLqhRbjveN5EFRXA2cFg6j2rV30KEZ2OrmwW/CwtfDdJdZ Y=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 19 Oct 2021 08:32:20 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 08:32:19 -0700 Received: from [10.111.162.88] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 19 Oct 2021 08:32:16 -0700 Message-ID: <468c435b-192b-790b-2a2d-8f7ddfb4a061@quicinc.com> Date: Tue, 19 Oct 2021 11:32:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v2 04/11] sched: Simplify wake_up_*idle*() Content-Language: en-US To: Peter Zijlstra CC: , , , , , , , , , , , , , , , , References: <20210929151723.162004989@infradead.org> <20210929152428.769328779@infradead.org> From: Qian Cai In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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