lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <468c435b-192b-790b-2a2d-8f7ddfb4a061@quicinc.com>
Date:   Tue, 19 Oct 2021 11:32:15 -0400
From:   Qian Cai <quic_qiancai@...cinc.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     <gor@...ux.ibm.com>, <jpoimboe@...hat.com>, <jikos@...nel.org>,
        <mbenes@...e.cz>, <pmladek@...e.com>, <mingo@...nel.org>,
        <linux-kernel@...r.kernel.org>, <joe.lawrence@...hat.com>,
        <fweisbec@...il.com>, <tglx@...utronix.de>, <hca@...ux.ibm.com>,
        <svens@...ux.ibm.com>, <sumanthk@...ux.ibm.com>,
        <live-patching@...r.kernel.org>, <paulmck@...nel.org>,
        <rostedt@...dmis.org>, <x86@...nel.org>
Subject: Re: [PATCH v2 04/11] sched: Simplify wake_up_*idle*()



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ