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: <87plxflx4x.fsf@somnus>
Date: Thu, 01 Feb 2024 21:58:38 +0100
From: Anna-Maria Behnsen <anna-maria@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>
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>, Rik van Riel <riel@...riel.com>,
 Steven Rostedt <rostedt@...dmis.org>, Sebastian Siewior
 <bigeasy@...utronix.de>, Giovanni Gherdovich <ggherdovich@...e.cz>, Lukasz
 Luba <lukasz.luba@....com>, "Gautham R . Shenoy" <gautham.shenoy@....com>,
 Srinivas Pandruvada <srinivas.pandruvada@...el.com>, K Prateek Nayak
 <kprateek.nayak@....com>, Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH v10 20/20] timers: Always queue timers on the local CPU

Frederic Weisbecker <frederic@...nel.org> writes:

> Le Mon, Jan 15, 2024 at 03:37:43PM +0100, Anna-Maria Behnsen a écrit :
>> The timer pull model is in place so we can remove the heuristics which try
>> to guess the best target CPU at enqueue/modification time.
>> 
>> All non pinned timers are queued on the local CPU in the separate storage
>> and eventually pulled at expiry time to a remote CPU.
>> 
>> Originally-by: Richard Cochran (linutronix GmbH) <richardcochran@...il.com>
>> Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
>
> Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
>
> Just one detail below:
>
>> @@ -590,10 +590,13 @@ trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
>>  
>>  	/*
>>  	 * We might have to IPI the remote CPU if the base is idle and the
>> -	 * timer is not deferrable. If the other CPU is on the way to idle
>> -	 * then it can't set base->is_idle as we hold the base lock:
>> +	 * timer is pinned. If it is a non pinned timer, it is only queued
>> +	 * on the remote CPU, when timer was running during queueing. Then
>> +	 * everything is handled by remote CPU anyway. If the other CPU is
>> +	 * on the way to idle then it can't set base->is_idle as we hold
>> +	 * the base lock:
>>  	 */
>> -	if (base->is_idle)
>> +	if (base->is_idle && timer->flags & TIMER_PINNED)
>
> Is the TIMER_PINNED test necessary? If base->is_idle, then the timer
> is now guaranteed to be TIMER_PINNED, right?
>

Yes, you are right. Should I drop it? To clarify it, I could add a

  WARN_ON_ONCE(!timer->flags & TIMER_PINNED)

instead.

Thanks,

	Anna-Maria


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ