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: <Zxe89zvC5uhI7ZxG@gpd3>
Date: Tue, 22 Oct 2024 16:55:51 +0200
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched_ext: Introduce LLC awareness to the default
 idle selection policy

On Tue, Oct 22, 2024 at 12:14:22PM +0200, Andrea Righi wrote:
...
> +	/*
> +	 * Determine the task's LLC domain.
> +	 */
> +	llc_mask = llc_domain(prev_cpu);
> +	if (llc_cpus && llc_mask)
> +		llc_empty = !cpumask_and(llc_cpus, llc_mask, p->cpus_ptr);
> +	else
> +		llc_empty = true;

Thinking more about this, we can avoid re-generating the llc_cpus
cpumask when the task can run on all CPUs (likely the majority of the
cases) and it's probably more efficient to check for
cpumask_equal(p->cpus_ptr, cpu_possible_mask) and just use llc_mask in
this case.

We could also optimize tasks that can only run on 1 CPU, but we never
call ops.select_cpu() for them, they're just skipped in
select_task_rq(), so I'm not sure if we should handle this special case
(maybe I can add a comment, to make it more clear).

-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ