From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbcGVETV (ORCPT ); Fri, 22 Jul 2016 00:19:21 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37042 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751088AbcGVETT (ORCPT ); Fri, 22 Jul 2016 00:19:19 -0400 Message-ID: <1469161153.3862.62.camel@gmail.com> Subject: Re: Question about group scheduler cpu shares From: Mike Galbraith To: Gaurav Poothia Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com Date: Fri, 22 Jul 2016 06:19:13 +0200 In-Reply-To: References: <1469155888.3862.26.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-07-21 at 20:24 -0700, Gaurav Poothia wrote: (top posting.. naught naughty;) > 1.What is the function that translates from various nice levels to > weight i.e. nice(0) == 1024 how to translate for other levels If you rummage around in kernel/sched, you'll find this table: const int sched_prio_to_weight[40] = { /* -20 */ 88761, 71755, 56483, 46273, 36291, /* -15 */ 29154, 23254, 18705, 14949, 11916, /* -10 */ 9548, 7620, 6100, 4904, 3906, /* -5 */ 3121, 2501, 1991, 1586, 1277, /* 0 */ 1024, 820, 655, 526, 423, /* 5 */ 335, 272, 215, 172, 137, /* 10 */ 110, 87, 70, 56, 45, /* 15 */ 36, 29, 23, 18, 15, }; > 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? The math works the same as if you were adding task groups. An entity is an entity is an entity... -Mike