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: <f5968919-d0c2-4dd3-86dc-90d6710e6b7d@amd.com>
Date: Wed, 4 Feb 2026 15:45:58 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Peter Zijlstra <peterz@...radead.org>
CC: <mingo@...nel.org>, <juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
	<dietmar.eggemann@....com>, <rostedt@...dmis.org>, <bsegall@...gle.com>,
	<mgorman@...e.de>, <vschneid@...hat.com>, <linux-kernel@...r.kernel.org>,
	<wangtao554@...wei.com>, <quzicheng@...wei.com>, <wuyun.abel@...edance.com>,
	<dsmythies@...us.net>
Subject: Re: [PATCH 0/4] sched: Various reweight_entity() fixes

Hello Peter,

On 2/3/2026 5:49 PM, K Prateek Nayak wrote:
>> I'm not sure I have valuable tracing patches, I just stick random
>> trace_printk()s in.
> 
> I'll plop those in and update once the I get a log for sum_shift++.

Here is one set of log:

        # schbench enqueue

        schbench-103551  [255] ... : place_entity: Placed se: weight(1048576) vruntime(722711379921) vlag(2140867) deadline(722714179921) curr?(0)
        schbench-103551  [255] ... : place_entity: Placed on cfs_rq: depth(0) weight(4194304) nr_queued(4) sum_w_vruntime(0) sum_weight(3145728) zero_vruntime(722714445432) sum_shift(0) avg_vruntime(722714056004)
        schbench-103551  [255] ... : __enqueue_entity: Enqueue cfs_rq: depth(0) weight(5242880) nr_queued(5) sum_w_vruntime(663820959744) sum_weight(4194304) zero_vruntime(722713520787) sum_shift(0) avg_vruntime(722713520787)

        # Couple of reweight while running

        schbench-103551  [255] ... : reweight_entity: Reweight before se: weight(3459) vruntime(701806887728588) vlag(0) deadline(701807851411101) curr?(1)
        schbench-103551  [255] ... : reweight_entity: Before cfs_rq: depth(-1) weight(3459) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701806887728588)
        schbench-103551  [255] ... : reweight_entity: Reweight after se: weight(3505) vruntime(701806939248075) vlag(0) deadline(701807839439774) curr?(1)
        schbench-103551  [255] ... : reweight_entity: After cfs_rq: depth(-1) weight(3505) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701806939248075)

        schbench-103551  [255] ... : reweight_entity: Reweight before se: weight(3505) vruntime(701808246440736) vlag(0) deadline(701809202174069) curr?(1)
        schbench-103551  [255] ... : reweight_entity: Before cfs_rq: depth(-1) weight(3505) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701808246440736)
        schbench-103551  [255] ... : reweight_entity: Reweight after se: weight(3513) vruntime(701808246440736) vlag(0) deadline(701809199997619) curr?(1)
        schbench-103551  [255] ... : reweight_entity: After cfs_rq: depth(-1) weight(3513) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701808246440736)

        # put_prev_entity?

        schbench-103551  [255] ... : __enqueue_entity: Enqueue cfs_rq: depth(0) weight(5242880) nr_queued(5) sum_w_vruntime(-2130969624576) sum_weight(5242880) zero_vruntime(722714695180) sum_shift(0) avg_vruntime(722714695180)

        # set_next_entity?

        schbench-103551  [255] ... : __dequeue_entity: Dequeue cfs_rq: depth(0) weight(5242880) nr_queued(5) sum_w_vruntime(0) sum_weight(4194304) zero_vruntime(722715015932) sum_shift(0) avg_vruntime(722715015932)

        # More reweight

           <...>-102371  [255] ... : reweight_entity: Reweight before se: weight(3513) vruntime(701809611552543) vlag(0) deadline(701810567285876) curr?(1)
           <...>-102371  [255] ... : reweight_entity: Before cfs_rq: depth(-1) weight(3513) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701809611552543)
           <...>-102371  [255] ... : reweight_entity: Reweight after se: weight(3508) vruntime(701809611552543) vlag(0) deadline(701810568648095) curr?(1)
           <...>-102371  [255] ... : reweight_entity: After cfs_rq: depth(-1) weight(3508) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701809611552543)

           <...>-102371  [255] ... : place_entity: Placed se: weight(90891264) vruntime(701808975077099) vlag(24732) deadline(701808975109401) curr?(0)
           <...>-102371  [255] ... : place_entity: Placed on cfs_rq: depth(-1) weight(3508) nr_queued(1) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701809615900788)

       # Overflow on enqueue

           <...>-102371  [255] ... : __enqueue_entity: Overflowed cfs_rq:
           <...>-102371  [255] ... : dump_h_overflow_cfs_rq: cfs_rq: depth(0) weight(90894772) nr_queued(2) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701809615900788)
           <...>-102371  [255] ... : dump_h_overflow_entity: se: weight(3508) vruntime(701809615900788) slice(2800000) deadline(701810568648095) curr?(1) task?(1)       <-------- cfs_rq->curr
           <...>-102371  [255] ... : __enqueue_entity: Overflowed se:
           <...>-102371  [255] ... : dump_h_overflow_entity: se: weight(90891264) vruntime(701808975077099) slice(2800000) deadline(701808975109401) curr?(0) task?(0)   <-------- new se

       # Botched attempt at dumping the whole hierarchy

           <...>-102371  [255] ... : __enqueue_entity: Overflowed hierarchy from root:
           <...>-102371  [255] ... : dump_h_overflow_cfs_rq: cfs_rq: depth(0) weight(90894772) nr_queued(2) sum_w_vruntime(0) sum_weight(0) zero_vruntime(701164930256050) sum_shift(0) avg_vruntime(701809615900788)
           <...>-102371  [255] ... : dump_h_overflow_entity: se: weight(3508) vruntime(701809615900788) slice(2800000) deadline(701810568648095) curr?(1) task?(1)

           <...>-102371  [255] ... : dump_h_overflow_cfs_rq:  cfs_rq: depth(1) weight(5242880) nr_queued(5) sum_w_vruntime(0) sum_weight(4194304) zero_vruntime(722715015932) sum_shift(0) avg_vruntime(722715086591)
           <...>-102371  [255] ... : dump_h_overflow_entity:  se: weight(1048576) vruntime(722715369227) slice(2800000) deadline(722718169227) curr?(1) task?(0)
           <...>-102371  [255] ... : dump_h_overflow_entity:  se: weight(1048576) vruntime(722713453675) slice(2800000) deadline(722716247576) curr?(1) task?(0)
           <...>-102371  [255] ... : dump_h_overflow_entity:  se: weight(1048576) vruntime(722713498238) slice(2800000) deadline(722716290797) curr?(1) task?(0)
           <...>-102371  [255] ... : dump_h_overflow_entity:  se: weight(1048576) vruntime(722716384383) slice(2800000) deadline(722719172114) curr?(1) task?(0)
           <...>-102371  [255] ... : dump_h_overflow_entity:  se: weight(1048576) vruntime(722716727432) slice(2800000) deadline(722719517387) curr?(1) task?(0)


Attached is the debug patch. that can be used to interpret this data more.
per-CPU padding is just a variable to add padding for higher depths when
printing the hierarchy.

-- 
Thanks and Regards,
Prateek

View attachment "0001-sched-fair-Debug-multiplication-overflow.patch" of type "text/plain" (7203 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ