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] [day] [month] [year] [list]
Message-ID: <20251121111754.374593-1-sieberf@amazon.com>
Date: Fri, 21 Nov 2025 13:17:54 +0200
From: Fernand Sieber <sieberf@...zon.com>
To: <kprateek.nayak@....com>
CC: <mingo@...hat.com>, <peterz@...radead.org>,
	<linux-kernel@...r.kernel.org>, <juri.lelli@...hat.com>,
	<vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
	<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...hsingularity.net>,
	<vschneid@...hat.com>, <dwmw@...zon.co.uk>, <jschoenh@...zon.de>,
	<liuyuxua@...zon.com>
Subject: Re: [PATCH] sched/fair: Add more core cookie check in wake up fast path

Hi Prateek,

Thank you for taking the time to review my patch.

On 11/21/2025 2:54 AM, K Prateek Nayak wrote:
> nit.
>
> You can replace the whole
>
>   (available_idle_cpu() || sched_idle_cpu()) && sched_core_cookie_match()
>
> with "__select_idle_cpu() != 1" [...]

I'm happy to do some code cleanup, however note that `__select_idle_cpu`
is using `sched_cpu_cookie_match` whereas at this point in
`select_idle_sibling` we don't know whether there's a full idle core or not
available so I am proposing to use `sched_core_cookie_match`.

We might be able to do the following alternatives:
* use `__select_idle_cpu` (e.g `sched_cpu_cookie_match`) and ignore the case
  where the cpu might be idle but one of its siblings run an incompatible
  cookie. Perhaps simpler code but could yield more force idle.
* use `test_idle_cores` before deciding whether `sched_cpu_cookie_match` or
  `sched_core_cookie_match` is appropriate. This is the most correct but
  perhaps overly complex.

The approach that I picked has the disadvantages that it might fail some
fast heuristics unnecessarily if there are no full idle core available
anyways but I thought this was acceptable since the `select_idle_cpu`
fallback at the end of the function seems reasonable.

Let me know what you think.

Best regards,
Fernand



Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ