Re: [tip:sched/core] [sched/fair] 089d84203a: pts.schbench.32.usec,_99.9th_latency_percentile 52.4% regression

Shrikanth Hegde <[email protected]>
Newsgroups dev.linux.lists.oe-lkp,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On 12/18/25 2:07 PM, Peter Zijlstra wrote:
> On Thu, Dec 18, 2025 at 12:59:53PM +0800, kernel test robot wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed a 52.4% regression of pts.schbench.32.usec,_99.9th_latency_percentile on:
>>
>>
>> commit: 089d84203ad42bc8fd6dbf41683e162ac6e848cd ("sched/fair: Fold the sched_avg update")
>> https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git sched/core
> 
> Well, that obviously wasn't the intention. Let me pull that patch :/

Is it possible because it missed scaling by se_weight(se) ??


+#define __update_sa(sa, name, delta_avg, delta_sum) do {       \
+       add_positive(&(sa)->name##_avg, delta_avg);             \
+       add_positive(&(sa)->name##_sum, delta_sum);             \
+       (sa)->name##_sum = max_t(typeof((sa)->name##_sum),      \
+                              (sa)->name##_sum,                \
+                              (sa)->name##_avg * PELT_MIN_DIVIDER); \
+} while (0)
+
  static inline void
  enqueue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
  {
-       cfs_rq->avg.load_avg += se->avg.load_avg;
-       cfs_rq->avg.load_sum += se_weight(se) * se->avg.load_sum;
+       __update_sa(&cfs_rq->avg, load, se->avg.load_avg, se->avg.load_sum);
  }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.