[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250707215322.0e4ec431@gandalf.local.home>
Date: Mon, 7 Jul 2025 21:53:22 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Li,Rongqing" <lirongqing@...du.com>
Cc: Oleg Nesterov <oleg@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
David Laight <david.laight.linux@...il.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "vschneid@...hat.com"
<vschneid@...hat.com>, "mgorman@...e.de" <mgorman@...e.de>,
"bsegall@...gle.com" <bsegall@...gle.com>, "dietmar.eggemann@....com"
<dietmar.eggemann@....com>, "vincent.guittot@...aro.org"
<vincent.guittot@...aro.org>, "juri.lelli@...hat.com"
<juri.lelli@...hat.com>, "mingo@...hat.com" <mingo@...hat.com>
Subject: Re: [????] Re: divide error in x86 and cputime
On Tue, 8 Jul 2025 01:40:27 +0000
"Li,Rongqing" <lirongqing@...du.com> wrote:
> > That would be:
> >
> > minutes days
> > v v
> > 9223372036854775808 / 1000000000 / 60 / 60 / 24 / 365.25 = 292.27
> > ^ ^ ^
> > ns -> sec hours years
> >
> > So the report says they have threads running for a very long time, it would still
> > be 292 years of run time!
>
> Utime/rtime is u64, it means overflow needs 292.27*2=584 year,
>
> But with multiple thread, like 292 threads, it only need two years, it is a thread group total running time
>
>
> void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st)
> {
> struct task_cputime cputime;
>
> thread_group_cputime(p, &cputime);
> cputime_adjust(&cputime, &p->signal->prev_cputime, ut, st);
> }
>
So you are saying that you have been running this for over two years
without a reboot?
Then the issue isn't the divider, it's that the thread group cputime can
overflow. Perhaps it needs a cap, or a way to "reset" somehow after "so long"?
-- Steve
Powered by blists - more mailing lists