mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Loehle <christian.loehle@arm.com>
To: Qing Wang <wangqing7171@gmail.com>, peterz@infradead.org
Cc: bsegall@google.com, chenl311@chinatelecom.cn,
	dietmar.eggemann@arm.com, juri.lelli@redhat.com,
	kprateek.nayak@amd.com, linux-kernel@vger.kernel.org,
	mgorman@suse.de, mingo@redhat.com, rostedt@goodmis.org,
	vincent.guittot@linaro.org, vschneid@redhat.com
Subject: Re: [PATCH v2] sched/fair: Replace random newidle_balance with Bresenham accumulator
Date: Tue, 27 Oct 2026 21:22:51 +0000	[thread overview]
Message-ID: <40e5ef61-3b63-42b6-a109-e45998bafcc5@arm.com> (raw)
In-Reply-To: <20261027093142.2337191-1-wangqing7171@gmail.com>

On 10/27/26 09:31, Qing Wang wrote:
> Hi Peter,
> Gentle ping on this. I know you're busy, but I'd really appreciate your thoughts.
> 
>> I took the most sensitive workload I have for newidle balance (tbench)
>> and took it for a spin with these changes. Following are the results:
>>
>>     Clients:        tip                  bresenham_accm
>>         1      321.65 (0.00 pct)       313.97 (-2.38 pct)
>>         2      641.92 (0.00 pct)       638.74 (-0.49 pct)
>>         4     1245.65 (0.00 pct)      1237.26 (-0.67 pct)
>>         8     2435.80 (0.00 pct)      2442.23 ( 0.26 pct)
>>        16     4717.66 (0.00 pct)      4688.19 (-0.62 pct)
>>        32     9303.53 (0.00 pct)      9390.71 ( 0.93 pct)
>>        64    18002.57 (0.00 pct)     17911.56 (-0.50 pct)
>>       128    27729.26 (0.00 pct)     27621.95 (-0.38 pct)
>>       256    47134.77 (0.00 pct)     46137.36 (-2.11 pct)
>>       512    43179.41 (0.00 pct)     43277.53 ( 0.22 pct)
>>      1024    40339.30 (0.00 pct)     40176.49 (-0.40 pct)
>>
>> The %diff is in noise range which is a good indication that there
>> shouldn't be any surprises. I'll queue a run overnight to see if
>> there are other benchmarks that like / dislike these changes.
> 
> This benchmarks looks good from Prateek.
> Link: https://lore.kernel.org/all/da1896b3-6bec-4b56-bf6d-9ce775b00b8d@amd.com/
> Cc: K Prateek Nayak <kprateek.nayak@amd.com>

Might make sense to resubmit the patch as standalone.
Also minor suggestions inline:

+				 * Base on accumulator of Bresenham's line algorithm
+				 *
+				 * Accumulate ratio each time and trigger balance
+				 * when sum ≥ 1024.
>= Is more common I guess
+				 *
+				 * Ensures exactly ratio balances per 1024 calls
Ensures the same ratio balances per 1024 invocations
+				 * and distributes ratio balance operations uniformly
+				 * across every 1024 invocations.
across them.
 				 */

  reply	other threads:[~2026-10-27 21:22 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 16:06 [PATCH 0/4] sched: The newidle balance regression Peter Zijlstra
2025-11-07 16:06 ` [PATCH 1/4] sched/fair: Revert max_newidle_lb_cost bump Peter Zijlstra
2025-11-14 12:19   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2025-11-17 16:23   ` tip-bot2 for Peter Zijlstra
2025-11-07 16:06 ` [PATCH 2/4] sched/fair: Small cleanup to sched_balance_newidle() Peter Zijlstra
2025-11-10 13:55   ` Dietmar Eggemann
2025-11-10 14:04     ` Peter Zijlstra
2025-11-12 14:37   ` Shrikanth Hegde
2025-11-12 14:42     ` Peter Zijlstra
2025-11-12 15:08       ` Peter Zijlstra
2025-11-12 15:28         ` Shrikanth Hegde
2025-11-14  9:49           ` Peter Zijlstra
2025-11-14 10:22             ` Vincent Guittot
2025-11-14 11:05               ` Peter Zijlstra
2025-11-14 13:11                 ` Vincent Guittot
2025-11-14 12:19   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2025-11-17 16:23   ` tip-bot2 for Peter Zijlstra
2025-11-07 16:06 ` [PATCH 3/4] sched/fair: Small cleanup to update_newidle_cost() Peter Zijlstra
2025-11-14 12:19   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2025-11-17 16:23   ` tip-bot2 for Peter Zijlstra
2025-11-07 16:06 ` [PATCH 4/4] sched/fair: Proportional newidle balance Peter Zijlstra
2025-11-10 13:55   ` Dietmar Eggemann
2025-11-11  9:07   ` Adam Li
2025-11-11  9:20     ` Peter Zijlstra
2025-11-12 12:04       ` Adam Li
2025-11-12 13:41         ` Peter Zijlstra
2025-11-12 15:42   ` Shrikanth Hegde
2025-11-14  9:35     ` Peter Zijlstra
2025-11-14 12:18   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2025-11-17 16:23   ` tip-bot2 for Peter Zijlstra
2026-01-18 20:46   ` [PATCH 4/4] " Mario Roy
2026-01-23 10:50     ` Peter Zijlstra
2026-01-23 11:03       ` Peter Zijlstra
2026-01-23 12:24         ` K Prateek Nayak
2026-01-28  4:08           ` K Prateek Nayak
2026-01-27  4:15         ` Mario Roy
2026-01-27 10:40         ` Peter Zijlstra
2026-01-27 15:17           ` Peter Zijlstra
2026-01-30  1:44             ` Mario Roy
2026-01-30  4:14             ` Mario Roy
2026-02-24  9:13             ` [tip: sched/core] sched/fair: More complex proportional " tip-bot2 for Peter Zijlstra
2026-01-25 12:22     ` [PATCH 4/4] sched/fair: Proportional " Mohamed Abuelfotoh, Hazem
2026-01-27  8:44       ` Peter Zijlstra
2026-01-28 15:48         ` Mohamed Abuelfotoh, Hazem
2026-01-29  9:19           ` Peter Zijlstra
2026-01-29  9:24             ` Peter Zijlstra
2026-01-30 16:12               ` Mohamed Abuelfotoh, Hazem
2026-01-30 13:16             ` Mohamed Abuelfotoh, Hazem
2026-02-02 10:51               ` Peter Zijlstra
2026-02-02 11:07                 ` Mohamed Abuelfotoh, Hazem
2026-02-04 12:45                   ` Mohamed Abuelfotoh, Hazem
2026-02-04 13:27                     ` Peter Zijlstra
2026-02-04 13:59                       ` Mohamed Abuelfotoh, Hazem
2026-02-04 14:05                         ` Peter Zijlstra
2026-02-04 22:48                           ` Mohamed Abuelfotoh, Hazem
2026-01-27  8:50       ` Peter Zijlstra
2026-01-27  9:13         ` Peter Zijlstra
2026-01-28 16:24           ` Mohamed Abuelfotoh, Hazem
2026-01-28 16:03         ` Mohamed Abuelfotoh, Hazem
2026-04-29  8:51   ` Qing Wang
2026-05-06  2:44     ` [PATCH] sched/fair: Replace random newidle_balance with Bresenham accumulator Qing Wang
2026-05-13  2:21       ` Qing Wang
2026-05-13  5:29       ` K Prateek Nayak
2026-05-14  2:22         ` Qing Wang
2026-06-02  5:46       ` [PATCH v2] " Qing Wang
2026-10-27  9:31         ` Qing Wang
2026-10-27 21:22           ` Christian Loehle [this message]
2025-11-10 19:47 ` [PATCH 0/4] sched: The newidle balance regression Chris Mason
2025-11-11 19:08 ` Josh Don
2025-11-12 21:59 ` Chris Mason
2025-11-14  9:37   ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40e5ef61-3b63-42b6-a109-e45998bafcc5@arm.com \
    --to=christian.loehle@arm.com \
    --cc=bsegall@google.com \
    --cc=chenl311@chinatelecom.cn \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wangqing7171@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®