Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702361

Re: [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] sched: Implement interface for cgroup unified hierarchy
Date 2017-08-02 20:20 +0200
Message-ID <ua6pr-51S-7@gated-at.bofh.it> (permalink)
References (2 earlier) <u8w4G-7n-7@gated-at.bofh.it> <u9LO1-9K-3@gated-at.bofh.it> <u9Nd7-UI-5@gated-at.bofh.it> <ua44i-3hU-21@gated-at.bofh.it> <ua4nH-3Eo-71@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello, Peter.

On Wed, Aug 02, 2017 at 06:05:11PM +0200, Peter Zijlstra wrote:
> > * The stat file is sampling based and the usage files are calculated
> >   from actual scheduling events.  Is this because the latter is more
> >   accurate?
> 
> So I actually don't know the history of this stuff too well. But I would
> think so. This all looks rather dodgy.

I see.

> > * Why do we have user/sys breakdown in usage numbers?  It tries to
> >   distinguish user or sys by looking at task_pt_regs().  I can't see
> >   how this would work (e.g. interrupt handlers never schedule) and w/o
> >   kernel preemption, the sys part is always zero.  What is this number
> >   supposed to mean?
> 
> For normal scheduler stuff we account the total runtime in ns and use
> the user/kernel tick samples to divide it into user/kernel time parts.
> See cputime_adjust().
> 
> But looking at the cpuacct I have no clue, that looks wonky at best.
> 
> Ideally we'd reuse the normal cputime code and do the same thing
> per-cgroup, but clearly that isn't happening now.
> 
> I never really looked further than that cpuacct_charge() doing _another_
> cgroup iteration, even though we already account that delta to each
> cgroup (modulo scheduling class crud).

Yeah, it's kinda silly.  I'll see if I can just kill cpuacct for
cgroup2.

Thanks.

-- 
tejun

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/2] sched: Implement interface for cgroup unified  hierarchy Tejun Heo <tj@kernel.org> - 2017-08-01 22:20 +0200
  Re: [PATCH 2/2] sched: Implement interface for cgroup unified  hierarchy Peter Zijlstra <peterz@infradead.org> - 2017-08-01 23:50 +0200
    Re: [PATCH 2/2] sched: Implement interface for cgroup unified  hierarchy Tejun Heo <tj@kernel.org> - 2017-08-02 17:50 +0200
      Re: [PATCH 2/2] sched: Implement interface for cgroup unified  hierarchy Peter Zijlstra <peterz@infradead.org> - 2017-08-02 18:10 +0200
        Re: [PATCH 2/2] sched: Implement interface for cgroup unified  hierarchy Tejun Heo <tj@kernel.org> - 2017-08-02 20:20 +0200

csiph-web