Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Xunlei Pang
Hi Peter, On 7/9/18 6:48 PM, Peter Zijlstra wrote: > On Mon, Jul 09, 2018 at 01:52:38PM +0800, Xunlei Pang wrote: >> Please see the enclosure for the reproducer cputime_adjust.tgz > > No, I'm not going to reverse engineer something if you cannot even > explain what the problem is. > I rewrote

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Xunlei Pang
Hi Peter, On 7/9/18 6:48 PM, Peter Zijlstra wrote: > On Mon, Jul 09, 2018 at 01:52:38PM +0800, Xunlei Pang wrote: >> Please see the enclosure for the reproducer cputime_adjust.tgz > > No, I'm not going to reverse engineer something if you cannot even > explain what the problem is. > I rewrote

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Peter Zijlstra
On Mon, Jul 09, 2018 at 01:52:38PM +0800, Xunlei Pang wrote: > Please see the enclosure for the reproducer cputime_adjust.tgz No, I'm not going to reverse engineer something if you cannot even explain what the problem is.

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Peter Zijlstra
On Mon, Jul 09, 2018 at 01:52:38PM +0800, Xunlei Pang wrote: > Please see the enclosure for the reproducer cputime_adjust.tgz No, I'm not going to reverse engineer something if you cannot even explain what the problem is.

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Peter Zijlstra
On Thu, Jul 05, 2018 at 09:58:50PM +0800, xunlei wrote: > It is rtime < utime + stime, that is the imprecise tick-based run time > may be larger than precise sum_exec_runtime scheduler-based run time, it > can happen with some frequent run-sleep patterns. You're still comparing two values that

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-09 Thread Peter Zijlstra
On Thu, Jul 05, 2018 at 09:58:50PM +0800, xunlei wrote: > It is rtime < utime + stime, that is the imprecise tick-based run time > may be larger than precise sum_exec_runtime scheduler-based run time, it > can happen with some frequent run-sleep patterns. You're still comparing two values that

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-08 Thread Xunlei Pang
Hi Peter, On 7/5/18 9:21 PM, Xunlei Pang wrote: > On 7/5/18 6:46 PM, Peter Zijlstra wrote: >> On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: >>> tick-based whole utime is utime_0, tick-based whole stime >>> is stime_0, scheduler time is rtime_0. >> >>> For a long time, the process

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-08 Thread Xunlei Pang
Hi Peter, On 7/5/18 9:21 PM, Xunlei Pang wrote: > On 7/5/18 6:46 PM, Peter Zijlstra wrote: >> On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: >>> tick-based whole utime is utime_0, tick-based whole stime >>> is stime_0, scheduler time is rtime_0. >> >>> For a long time, the process

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread xunlei
On 7/5/18 9:42 PM, Peter Zijlstra wrote: > On Thu, Jul 05, 2018 at 09:21:15PM +0800, Xunlei Pang wrote: >> On 7/5/18 6:46 PM, Peter Zijlstra wrote: >>> On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: tick-based whole utime is utime_0, tick-based whole stime is stime_0,

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread xunlei
On 7/5/18 9:42 PM, Peter Zijlstra wrote: > On Thu, Jul 05, 2018 at 09:21:15PM +0800, Xunlei Pang wrote: >> On 7/5/18 6:46 PM, Peter Zijlstra wrote: >>> On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: tick-based whole utime is utime_0, tick-based whole stime is stime_0,

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Peter Zijlstra
On Thu, Jul 05, 2018 at 09:21:15PM +0800, Xunlei Pang wrote: > On 7/5/18 6:46 PM, Peter Zijlstra wrote: > > On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: > >> tick-based whole utime is utime_0, tick-based whole stime > >> is stime_0, scheduler time is rtime_0. > > > >> For a long

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Peter Zijlstra
On Thu, Jul 05, 2018 at 09:21:15PM +0800, Xunlei Pang wrote: > On 7/5/18 6:46 PM, Peter Zijlstra wrote: > > On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: > >> tick-based whole utime is utime_0, tick-based whole stime > >> is stime_0, scheduler time is rtime_0. > > > >> For a long

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Xunlei Pang
On 7/5/18 6:46 PM, Peter Zijlstra wrote: > On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: >> tick-based whole utime is utime_0, tick-based whole stime >> is stime_0, scheduler time is rtime_0. > >> For a long time, the process runs mainly in userspace with >> run-sleep patterns,

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Xunlei Pang
On 7/5/18 6:46 PM, Peter Zijlstra wrote: > On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: >> tick-based whole utime is utime_0, tick-based whole stime >> is stime_0, scheduler time is rtime_0. > >> For a long time, the process runs mainly in userspace with >> run-sleep patterns,

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Peter Zijlstra
On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: > tick-based whole utime is utime_0, tick-based whole stime > is stime_0, scheduler time is rtime_0. > For a long time, the process runs mainly in userspace with > run-sleep patterns, and because two different clocks, it > is possible

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-05 Thread Peter Zijlstra
On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote: > tick-based whole utime is utime_0, tick-based whole stime > is stime_0, scheduler time is rtime_0. > For a long time, the process runs mainly in userspace with > run-sleep patterns, and because two different clocks, it > is possible

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-04 Thread Xunlei Pang
On 7/2/18 11:21 PM, Tejun Heo wrote: > Hello, Peter. > > On Tue, Jun 26, 2018 at 05:49:08PM +0200, Peter Zijlstra wrote: >> Well, no, because the Changelog is incomprehensible and the patch >> doesn't really have useful comments, so I'll have to reverse engineer >> the entire thing, and I've just

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-04 Thread Xunlei Pang
On 7/2/18 11:21 PM, Tejun Heo wrote: > Hello, Peter. > > On Tue, Jun 26, 2018 at 05:49:08PM +0200, Peter Zijlstra wrote: >> Well, no, because the Changelog is incomprehensible and the patch >> doesn't really have useful comments, so I'll have to reverse engineer >> the entire thing, and I've just

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-02 Thread Tejun Heo
Hello, Peter. On Tue, Jun 26, 2018 at 05:49:08PM +0200, Peter Zijlstra wrote: > Well, no, because the Changelog is incomprehensible and the patch > doesn't really have useful comments, so I'll have to reverse engineer > the entire thing, and I've just not had time for that. Just as an additional

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-07-02 Thread Tejun Heo
Hello, Peter. On Tue, Jun 26, 2018 at 05:49:08PM +0200, Peter Zijlstra wrote: > Well, no, because the Changelog is incomprehensible and the patch > doesn't really have useful comments, so I'll have to reverse engineer > the entire thing, and I've just not had time for that. Just as an additional

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-27 Thread Xunlei Pang
On 6/26/18 11:49 PM, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 08:19:49PM +0800, Xunlei Pang wrote: >> On 6/22/18 3:15 PM, Xunlei Pang wrote: >>> We use per-cgroup cpu usage statistics similar to "cgroup rstat", >>> and encountered a problem that user and sys usages are wrongly >>> split

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-27 Thread Xunlei Pang
On 6/26/18 11:49 PM, Peter Zijlstra wrote: > On Tue, Jun 26, 2018 at 08:19:49PM +0800, Xunlei Pang wrote: >> On 6/22/18 3:15 PM, Xunlei Pang wrote: >>> We use per-cgroup cpu usage statistics similar to "cgroup rstat", >>> and encountered a problem that user and sys usages are wrongly >>> split

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 08:19:49PM +0800, Xunlei Pang wrote: > On 6/22/18 3:15 PM, Xunlei Pang wrote: > > We use per-cgroup cpu usage statistics similar to "cgroup rstat", > > and encountered a problem that user and sys usages are wrongly > > split sometimes. > > > > Run tasks with some random

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-26 Thread Peter Zijlstra
On Tue, Jun 26, 2018 at 08:19:49PM +0800, Xunlei Pang wrote: > On 6/22/18 3:15 PM, Xunlei Pang wrote: > > We use per-cgroup cpu usage statistics similar to "cgroup rstat", > > and encountered a problem that user and sys usages are wrongly > > split sometimes. > > > > Run tasks with some random

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-26 Thread Xunlei Pang
On 6/22/18 3:15 PM, Xunlei Pang wrote: > We use per-cgroup cpu usage statistics similar to "cgroup rstat", > and encountered a problem that user and sys usages are wrongly > split sometimes. > > Run tasks with some random run-sleep pattern for a long time, and > when tick-based time and scheduler

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-26 Thread Xunlei Pang
On 6/22/18 3:15 PM, Xunlei Pang wrote: > We use per-cgroup cpu usage statistics similar to "cgroup rstat", > and encountered a problem that user and sys usages are wrongly > split sometimes. > > Run tasks with some random run-sleep pattern for a long time, and > when tick-based time and scheduler

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-25 Thread Xunlei Pang
On 6/22/18 6:35 PM, kbuild test robot wrote: > Hi Xunlei, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on tip/sched/core] > [also build test WARNING on v4.18-rc1 next-20180622] > [if your patch is applied to the wrong git tree, please drop us a note to

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-25 Thread Xunlei Pang
On 6/22/18 6:35 PM, kbuild test robot wrote: > Hi Xunlei, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on tip/sched/core] > [also build test WARNING on v4.18-rc1 next-20180622] > [if your patch is applied to the wrong git tree, please drop us a note to

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-22 Thread kbuild test robot
Hi Xunlei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/sched/core] [also build test WARNING on v4.18-rc1 next-20180622] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-22 Thread kbuild test robot
Hi Xunlei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/sched/core] [also build test WARNING on v4.18-rc1 next-20180622] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-22 Thread Xunlei Pang
We use per-cgroup cpu usage statistics similar to "cgroup rstat", and encountered a problem that user and sys usages are wrongly split sometimes. Run tasks with some random run-sleep pattern for a long time, and when tick-based time and scheduler sum_exec_runtime hugely drifts apart(scheduler

[PATCH] sched/cputime: Ensure correct utime and stime proportion

2018-06-22 Thread Xunlei Pang
We use per-cgroup cpu usage statistics similar to "cgroup rstat", and encountered a problem that user and sys usages are wrongly split sometimes. Run tasks with some random run-sleep pattern for a long time, and when tick-based time and scheduler sum_exec_runtime hugely drifts apart(scheduler