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: <87r1gudj87.ffs@nanos.tec.linutronix.de>
Date:   Tue, 22 Jun 2021 17:14:48 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Ani Sinha <ani@...sinha.ca>, linux-kernel@...r.kernel.org
Cc:     anirban.sinha@...ia.com, Ani Sinha <ani@...sinha.ca>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH v3] Add kernel logs when sched clock unstable and NO_HZ_FULL is not possible

On Sun, Jun 20 2021 at 15:43, Ani Sinha wrote:

> Commit 4f49b90abb4aca ("sched-clock: Migrate to use new tick
> dependency mask model") had also removed the kernel warning
> message informing the user that it was not possible to turn
> on NO_HZ_FULL. Adding back that log message here. It is
> unhelpful when the kernel turns off NO_HZ_FULL silently
> without informing anyone.
> Also added a kernel log when sched clock is marked as unstable.

Don't do two things at once. See Documentation/process/....

Also your subject line want's a proper prefix.

> diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
> index c2b2859ddd82..9f9fe658f8a5 100644
> --- a/kernel/sched/clock.c
> +++ b/kernel/sched/clock.c
> @@ -192,8 +192,11 @@ void clear_sched_clock_stable(void)
>  
>  	smp_mb(); /* matches sched_clock_init_late() */
>  
> -	if (static_key_count(&sched_clock_running.key) == 2)
> +	if (static_key_count(&sched_clock_running.key) == 2) {
> +		WARN_ONCE(sched_clock_stable(),
> +			  "sched clock is now marked unstable.");

What's the WARN for here? That backtrace is largely uninteresting.

> -	if (can_stop_full_tick(cpu, ts))
> +	if (can_stop_full_tick(cpu, ts)) {
>  		tick_nohz_stop_sched_tick(ts, cpu);
> -	else if (ts->tick_stopped)
> -		tick_nohz_restart_sched_tick(ts, ktime_get());
> +	} else {
> +		/*
> +		 * Don't allow the user to think they can get
> +		 * full NO_HZ with this machine.
> +		 */
> +		WARN_ONCE(tick_nohz_full_running,
> +			  "NO_HZ_FULL will not work for the current system.");

can_stop_full_tick() returning false can be transient and then the user
still has no idea _why_ this is printed.

Also assume the user/admin starts perf and knows he's going to disturb
NOHZ full, then _why_ would he be interested in that warning.

And again the backtrace is useless. The call path is known.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ