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: <Z4GTA4vw6-5_JAox@slm.duckdns.org>
Date: Fri, 10 Jan 2025 11:37:07 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	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>,
	Valentin Schneider <vschneid@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7] sched_ext: idle: Refresh idle masks during
 idle-to-idle transitions

Hello,

On Fri, Jan 10, 2025 at 10:23:21PM +0100, Andrea Righi wrote:
...
> +	/*
> +	 * Update the idle masks:
> +	 * - for real idle transitions (do_notify == true)
> +	 * - for idle-to-idle transitions (indicated by the previous task
> +	 *   being the idle thread, managed by pick_task_idle())
> +	 *
> +	 * Skip updating idle masks if the previous task is not the idle
> +	 * thread, since set_next_task_idle() has already handled it when
> +	 * transitioning from a task to the idle thread (calling this
> +	 * function with do_notify == true).
> +	 *
> +	 * In this way we can avoid updating the idle masks twice,
> +	 * unnecessarily.
> +	 */
> +	if (do_notify || is_idle_task(rq->curr))
> +		update_idle_masks(cpu, idle);

Sorry about the multiple nitpicks but wouldn't it be better to have the
static_key test before dynamic tests? I'd move scx_builtin_idle_enabled test
out of update_idle_masks() and put that in front of other tests here. Also,
maybe name the function update_builtin_idle() to stay consistent with the
static_key name? Otherwise looks good to me.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ