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:   Mon, 7 Nov 2022 23:07:27 +0100
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Anna-Maria Behnsen <anna-maria@...utronix.de>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        John Stultz <jstultz@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Eric Dumazet <edumazet@...gle.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Arjan van de Ven <arjan@...radead.org>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Rik van Riel <riel@...riel.com>
Subject: Re: [PATCH v4 14/16] timer: Implement the hierarchical pull model

On Fri, Nov 04, 2022 at 03:57:35PM +0100, Anna-Maria Behnsen wrote:
> @@ -1859,6 +1863,36 @@ void forward_and_idle_timer_bases(unsigned long basej, u64 basem,
>  	 */
>  	is_idle = time_after(nextevt, basej + 1);
>  
> +	if (is_idle) {
> +		u64 next_tmigr;
> +
> +		next_tmigr = tmigr_cpu_deactivate(tevt->global);
> +
> +		tevt->global = KTIME_MAX;
> +
> +		/*
> +		 * If CPU is the last going idle in timer migration
> +		 * hierarchy, make sure CPU will wake up in time to handle
> +		 * remote timers. next_tmigr == KTIME_MAX if other CPUs are
> +		 * still active.
> +		 */
> +		if (next_tmigr < tevt->local) {
> +			u64 tmp;
> +
> +			/* If we missed a tick already, force 0 delta */
> +			if (next_tmigr < basem)
> +				next_tmigr = basem;
> +
> +			tmp = div_u64(next_tmigr - basem, TICK_NSEC);
> +
> +			nextevt = basej + (unsigned long)tmp;
> +			tevt->local = next_tmigr;
> +			is_idle = time_after(nextevt, basej + 1);
> +		} else {
> +			nextevt = nextevt_local;

That else part look unecessary.

> +		}
> +	}
> +
>  	/* We need to mark both bases in sync */
>  	base_local->is_idle = base_global->is_idle = is_idle;

Do we still need to maintain base_global->is_idle ?

(I'm going to do daily reviews on this patch because it's quite dense :)

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ