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: <a176acab-caf9-400a-8894-e7c88d684208@linux.ibm.com>
Date: Wed, 22 Oct 2025 23:12:34 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Ingo Molnar <mingo@...nel.org>, Chen Yu <yu.c.chen@...el.com>,
        Doug Nelson <doug.nelson@...el.com>,
        Mohini Narkhede <mohini.narkhede@...el.com>,
        linux-kernel@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        K Prateek Nayak <kprateek.nayak@....com>
Subject: Re: [RESEND PATCH] sched/fair: Skip sched_balance_running cmpxchg
 when balance is not due



On 10/16/25 7:33 PM, Shrikanth Hegde wrote:
> 
> 
> On 10/14/25 3:12 PM, Peter Zijlstra wrote:
>> On Tue, Oct 14, 2025 at 03:03:41PM +0530, Shrikanth Hegde wrote:
>>
>>>> @@ -11758,6 +11775,12 @@ static int sched_balance_rq(int this_cpu, 
>>>> struct rq *this_rq,
>>>>            goto out_balanced;
>>>>        }
>>>> +    if (idle != CPU_NEWLY_IDLE && (sd->flags & SD_SERIALIZE)) {
>>>> +        if (atomic_cmpxchg_acquire(&sched_balance_running, 0, 1))
>>>> +            goto out_balanced;
>>>
>>> Maybe goto out instead of out_balanced ?
>>
>> That would be inconsistent with the !should_we_balance() goto
>> out_balanced right above this, no?
>>
> Hi Peter.
> 
> Did similar probe points numbers compared to this. Even the patch is 
> quite similar to what
> was suggested there a while ago.
> https://lore.kernel.org/all/41e11090-a100-48a7-a0dd- 
> c989772822d7@...ux.ibm.com/
> 
> 480 CPUs system with 6 NUMA nodes. (different system than last time)
> 

Hi Peter, Tim.

How are we proceeding here? Should i send the below patch with changelog or
is it being worked out by either of you.

It is really beneficial for large systems to avoid un-neccessary cache bouncing.

> tl;dr
> 
> - Number of time sched_balance_running is taken is way less after the 
> swb check. (which is great)
> - Number of time it fails to set is very low after swb. (So out_balanced 
> vs out may not make a
> significant difference.)
> - Patch is at the end. It is this patch + redo stuff + 
> (ref_variable_stuff(ignore))
> 
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ