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


Groups > linux.kernel > #1599712

Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode
Date Mon, 13 Mar 2017 20:30:02 +0100
Message-ID <tkDPj-58M-9@gated-at.bofh.it> (permalink)
References <t6SEx-6EY-19@gated-at.bofh.it> <t6Thf-7ai-19@gated-at.bofh.it> <t7R3I-53r-15@gated-at.bofh.it> <t8Ktc-7a8-15@gated-at.bofh.it> <t8U9b-4Wt-5@gated-at.bofh.it> <t9m5r-5JI-15@gated-at.bofh.it> <t9nEe-6Co-29@gated-at.bofh.it> <t9UA9-1Yw-3@gated-at.bofh.it> <t9Wsh-3fy-3@gated-at.bofh.it> <tahGq-7NL-9@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=A858m5CkQbNJa5f/6O6Hi2TjefSfhztvBu51rPf1CpU=; b=omj7P9i/Q1F/Shxl8zYARGBypVd4Kuh5mehpY9Swai6NVkhzADh2C2NqpajgjFu7Co pX/03yCudF5eWVgGY7t3H4EJJ8jwfoVMlSUMb+5SJDXrjVdi3DAakbAxU/3TAhFLGjiz MrgMg3V2HcEkXcevPW20pBAZJwHawJjuzdVSGYGiF95pwWRUs0TNwojwYgIIEYWXk35i YqBvkfLTAU0y2oByGuoxFNTVwFHjU5cYSCquIatd4kqeKJ3DUqU/LZSqF7VQqLLqwIsO nV8YcrgE1FoN6Qps/UTXFhU28BwCVOZN/phk/L+Yd9mrL1yMWUoNLo0KquEuYrmF9+2/ 2wow==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=A858m5CkQbNJa5f/6O6Hi2TjefSfhztvBu51rPf1CpU=; b=ZbRQ+esmq4Fe9PQ1C7fDgcsMuzkR3OPK5orz864dtblLMUJ+syCFNvWz9WgOzby9y0 JcoPtujGdA2rNogRGZHKVocdFDTLDIbYpugz4ZKusEwrso3mLTUli7/X3VPef5MCWjKA Hb32esdy9jr9Qb9QV3CT+Q5sV0Mr/TboV0/qLd6F41EPtUbE64bb8Pq/IqvSYAfAQHJZ 1+60myQ8RIwV9vDfROA89kpSJGh2iGfBVKTcHrLEXgt2TAm722qPgs6zFYMNmEKlmu+n 7w43EnMAboeTOUR/oSZWS9fqJW+dezKcdUsLcI5bscNBmpAuCxn84hVvkTE8Notxs9lO wkUg==
X-Gm-Message-State AMke39matZ9UKVNjD8fhUikSFMxCUxxxdO3GR300Sat6CcohwDiwfoSUKQH1HsqKkKgdyw==
X-Received by 10.129.137.71 with SMTP id z68mr19020457ywf.303.1489433183164; Mon, 13 Mar 2017 12:26:23 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 47
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, lizefan@huawei.com, hannes@cmpxchg.org, mingo@redhat.com, pjt@google.com, luto@amacapital.net, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, lvenanci@redhat.com, Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org>
X-Original-Date Mon, 13 Mar 2017 15:26:21 -0400
X-Original-Message-ID <20170313192621.GD15709@htj.duckdns.org>
X-Original-References <20170203202048.GD6515@twins.programming.kicks-ass.net> <20170203205955.GA9886@mtj.duckdns.org> <20170206124943.GJ6515@twins.programming.kicks-ass.net> <20170208230819.GD25826@htj.duckdns.org> <20170209102909.GC6515@twins.programming.kicks-ass.net> <20170210154508.GA16097@mtj.duckdns.org> <20170210175145.GJ6515@twins.programming.kicks-ass.net> <20170212050544.GJ29323@mtj.duckdns.org> <1486882799.24462.25.camel@gmx.de> <1486964707.5912.93.camel@gmx.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1599712

Show key headers only | View raw


Hello, Mike.

Sorry about the long delay.

On Mon, Feb 13, 2017 at 06:45:07AM +0100, Mike Galbraith wrote:
> > > So, as long as the depth stays reasonable (single digit or lower),
> > > what we try to do is keeping tree traversal operations aggregated or
> > > located on slow paths.  There still are places that this overhead
> > > shows up (e.g. the block controllers aren't too optimized) but it
> > > isn't particularly difficult to make a handful of layers not matter at
> > > all.
> > 
> > A handful of cpu bean counting layers stings considerably.

Hmm... yeah, I was trying to think about ways to avoid full scheduling
overhead at each layer (the scheduler does a lot per each layer of
scheduling) but don't think it's possible to circumvent that without
introducing a whole lot of scheduling artifacts.

In a lot of workloads, the added overhead from several layers of CPU
controllers doesn't seem to get in the way too much (most threads do
something other than scheduling after all).  The only major issue that
we're seeing in the fleet is the cgroup iteration in idle rebalancing
code pushing up the scheduling latency too much but that's a different
issue.

Anyways, I understand that there are cases where people would want to
avoid any extra layers.  I'll continue on PeterZ's message.

> BTW, that overhead is also why merging cpu/cpuacct is not really as
> wonderful as it may seem on paper.  If you only want to account, you
> may not have anything to gain from group scheduling (in fact it may
> wreck performance), but you'll pay for it.

There's another reason why we would want accounting separate - because
weight based controllers, cpu and io currently, can't be enabled
without affecting the scheduling behavior.  However, they're different
from CPU controllers in that all the heavy part of operations can be
shifted to the readers (we just need to do per-cpu updates from hot
paths), so we might as well publish those stats by default on the v2
hierarchy.  We couldn't do the same in v1 because the number of
hierarchies were not limited.

Thanks.

-- 
tejun

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


Thread

Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode Tejun Heo <tj@kernel.org> - 2017-03-13 20:30 +0100
  Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode Mike Galbraith <efault@gmx.de> - 2017-03-14 16:00 +0100

csiph-web