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]
Date:	Tue, 15 Apr 2014 09:25:57 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Arvind Chauhan <Arvind.Chauhan@....com>,
	Linaro Networking <linaro-networking@...aro.org>
Subject: Re: [PATCH 22/38] tick-sched: no need to recheck cpu_online() in can_stop_idle_tick()

On 15 April 2014 01:22, Stephen Boyd <sboyd@...eaurora.org> wrote:
> On 04/14/14 09:23, Viresh Kumar wrote:
>> We have already checked if 'cpu' is online or not and so don't need to recheck
>> it.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
>
> Hm... doing some git archeology shows fa116ea35ec7 (nohz: no softirq
> pending warnings for offline cpus, 2008-12-11), where the cpu_online()
> check was added. Before that commit we already checked cpu_online()
> similar to how the code is today. Perhaps we need to add a comment here?

Okay, I didn't understood what you want completely. You want me to update
commit logs or drop this patch and update code?

But yes there is one more thing worth mentioning:

commit f7ea0fd6 (tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is
offline, May 13 2013), which did this:

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 0eed1db..0121421 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -469,6 +469,7 @@ static bool can_stop_idle_tick(int cpu, struct
tick_sched *ts)
        if (unlikely(!cpu_online(cpu))) {
                if (cpu == tick_do_timer_cpu)
                        tick_do_timer_cpu = TICK_DO_TIMER_NONE;
+               return false;
        }

        if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))


So, when the patch you mentioned was added, we didn't had this and a
recheck of cpu_online() was perhaps required. But it is surely not required
anymore.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ