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:   Wed, 2 Sep 2020 01:38:59 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Marcelo Tosatti <mtosatti@...hat.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [patch 1/2] nohz: try to avoid IPI when configuring per-CPU
 posix timer

On Tue, Aug 25, 2020 at 03:41:48PM -0300, Marcelo Tosatti wrote:
> When enabling per-CPU posix timers, an IPI to nohz_full CPUs might be
> performed (to re-read the dependencies and possibly not re-enter
> nohz_full on a given CPU).
> 
> A common case is for applications that run on nohz_full= CPUs 
> to not use POSIX timers (eg DPDK). This patch skips the IPI 
> in case the task allowed mask does not intersect with nohz_full= CPU mask,
> when going through tick_nohz_dep_set_signal.
> 
> This reduces interruptions to nohz_full= CPUs.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@...hat.com>
[...]
>  /*
> + * Set bit on nohz full dependency, kicking all cpus
> + * only if task can run on nohz full CPUs.
> + */
> +static void tick_nohz_dep_set_all_cond(struct task_struct *tsk,
> +				       atomic_t *dep,
> +				       enum tick_dep_bits bit)
> +{
> +	int prev;
> +	unsigned long flags;
> +
> +	prev = atomic_fetch_or(BIT(bit), dep);
> +	if (prev)
> +		return;
> +
> +	raw_spin_lock_irqsave(&tsk->pi_lock, flags);
> +	if (cpumask_intersects(&tsk->cpus_mask, tick_nohz_full_mask))
> +		tick_nohz_full_kick_all();

So that's for one task but what about the other threads in that
process? We are setting the tick dependency on all tasks sharing that
struct signal.

Thanks.

> +	raw_spin_unlock_irqrestore(&tsk->pi_lock, flags);
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ