From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751738AbcGVDYO (ORCPT ); Thu, 21 Jul 2016 23:24:14 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37602 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbcGVDYM (ORCPT ); Thu, 21 Jul 2016 23:24:12 -0400 MIME-Version: 1.0 In-Reply-To: <1469155888.3862.26.camel@gmail.com> References: <1469155888.3862.26.camel@gmail.com> From: Gaurav Poothia Date: Thu, 21 Jul 2016 20:24:07 -0700 Message-ID: Subject: Re: Question about group scheduler cpu shares To: Mike Galbraith Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Mike. So if I understand you right - tasks on interior nodes get their weight from task's nice level and not from some cpu.share setting. Two followups: 1.What is the function that translates from various nice levels to weight i.e. nice(0) == 1024 how to translate for other levels 2.How does that work when an interior node has multiple tasks? So if I added tasks E and F with difference nice levels to Group 1 task list how would the math work? Appreciate the help -thanks! On Thu, Jul 21, 2016 at 7:51 PM, Mike Galbraith wrote: > On Thu, 2016-07-21 at 18:18 -0700, Gaurav Poothia wrote: > >> > ROOT >> > > >> > + -Group1(3072) >> > > | >> > > +- A(2048) >> > > | >> > > +- B(1024) >> > > >> > +- Group2(2048) >> > | >> > +-C(1024) >> > | >> > +-D(1024) >> > > >> > 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 > > A, B and E are all entities with a weight, so just plug E into your > graph. Its weight is determined by nice level, which is what cgroups > should have done instead of inventing shares IMHO. 1024 == nice(0). > > -Mike -- Kiva.org - Loans That Change Lives