From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbcGUTDw (ORCPT ); Thu, 21 Jul 2016 15:03:52 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38278 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395AbcGUTDu (ORCPT ); Thu, 21 Jul 2016 15:03:50 -0400 MIME-Version: 1.0 From: Gaurav Poothia Date: Thu, 21 Jul 2016 12:03:47 -0700 Message-ID: Subject: Question about group scheduler cpu shares To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The cgroup "cpu" subsystem's weight calculation using "cpu shares" is fairly clear when all tasks are attached to the leaf cgroups in "cpu" subsystem. For example in this cgroup hierarchy with tasks A.B,C and D and associated cpu shares: ROOT | + -Group1(3072) | | | +- A(2048) | | | +- B(1024) | +- Group2(2048) | +-C(1024) | +-D(1024) Group 1 and Group 2 split the CPU 60% to 40% respectively A and B split Group1's 60% share 2/3rd to 1/3rd so absolute share of CPU will be 40% and 20% respectively C and D split Group2's 40% share evenly so absolute shares or 20% each So far so good. But in this example all tasks are associated with leaf cgroups. Say I add a task E to Group1's task list (note that is an interior aka non-leaf node) How does the CPU split change between A, B and E. AFAICT there is no cgroup cpu subsystem knob to weight tasks on an interior node against the tasks in that node's children Thanks in advance! Gaurav