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


Groups > linux.kernel > #1448385

Re: Question about group scheduler cpu shares

From Mike Galbraith <umgwanakikbuti@gmail.com>
Newsgroups linux.kernel
Subject Re: Question about group scheduler cpu shares
Date 2016-07-22 06:20 +0200
Message-ID <rXA6m-Ky-11@gated-at.bofh.it> (permalink)
References <rXrw5-3fM-21@gated-at.bofh.it> <rXxi9-78Y-5@gated-at.bofh.it> <rXyQW-88M-29@gated-at.bofh.it> <rXzjX-a6-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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


Thread

Question about group scheduler cpu shares Gaurav Poothia <gaurav.poothia@gmail.com> - 2016-07-21 21:10 +0200
  Re: Question about group scheduler cpu shares Gaurav Poothia <gaurav.poothia@gmail.com> - 2016-07-22 03:20 +0200
    Re: Question about group scheduler cpu shares Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-07-22 05:00 +0200
      Re: Question about group scheduler cpu shares Gaurav Poothia <gaurav.poothia@gmail.com> - 2016-07-22 05:30 +0200
        Re: Question about group scheduler cpu shares Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-07-22 06:20 +0200

csiph-web