[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231005144257.GC743@noisy.programming.kicks-ass.net>
Date: Thu, 5 Oct 2023 16:42:57 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Youssef Esmat <youssefesmat@...omium.org>
Cc: Daniel Jordan <daniel.m.jordan@...cle.com>, mingo@...nel.org,
vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
juri.lelli@...hat.com, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, corbet@....net, qyousef@...alina.io,
chris.hyser@...cle.com, patrick.bellasi@...bug.net, pjt@...gle.com,
pavel@....cz, qperret@...gle.com, tim.c.chen@...ux.intel.com,
joshdon@...gle.com, timj@....org, kprateek.nayak@....com,
yu.c.chen@...el.com, joel@...lfernandes.org, efault@....de,
tglx@...utronix.de
Subject: Re: [PATCH 00/15] sched: EEVDF and latency-nice and/or slice-attr
On Thu, Oct 05, 2023 at 04:14:08PM +0200, Peter Zijlstra wrote:
> --- eevdf.c.orig 2023-10-05 16:11:35.821114320 +0200
> +++ eevdf.c 2023-10-05 16:08:38.387080327 +0200
> @@ -7,6 +7,7 @@
> #include <sys/param.h>
>
> bool eligible = true;
> +bool bias = false;
> unsigned long V_lim = 20;
>
> struct entity {
> @@ -79,16 +80,17 @@
>
> struct entity *pick_entity(int nr, struct entity *es)
> {
> - unsigned long W = 0, V = 0;
> + unsigned long W = 0, V = 0, R = 0;
> struct entity *e = NULL;
>
> for (int i = 0; i < nr; i++) {
> V += es[i].weight * es[i].vruntime;
> + R += es[i].request;
* 1024
Also, average seems too much, one large value lifts it too easily.
Need to come up with something better :/
> W += es[i].weight;
> }
>
> for (int i = 0; i < nr; i++) {
> - if (eligible && W*es[i].vruntime > V)
> + if (eligible && W*es[i].vruntime > V + (bias * R))
> continue;
>
> if (!e || es[i].vdeadline < e->vdeadline)
> @@ -169,10 +171,14 @@
>
> const int N = sizeof(es) / sizeof(es[0]);
>
> - while ((opt = getopt(argc, argv, "nv:e:")) != -1) {
> + while ((opt = getopt(argc, argv, "bnv:e:")) != -1) {
> unsigned int v,w,r;
>
> switch (opt) {
> + case 'b':
> + bias = true;
> + break;
> +
> case 'n':
> eligible = false;
> break;
Powered by blists - more mailing lists