Re: [RFC][PATCH 12/13] sched/deadline: Introduce deadline servers

From: Juri Lelli
Date: Fri Sep 06 2019 - 05:36:24 EST


Hi,

On 30/08/19 13:24, Peter Zijlstra wrote:
> On Thu, Aug 08, 2019 at 11:45:46AM +0200, Juri Lelli wrote:
> > I'd like to take this last sentence back, I was able to run a few boot +
> > hackbench + shutdown cycles with the following applied (guess too much
> > debug printks around before).
>
> I've changed that slightly; the merged delta looks like:

It looks like I had to further apply what follows on top of your latest
wip-deadline branch (d3138279c7f3) to make kvm boot.

--->8---
kernel/fork.c | 2 ++
kernel/sched/core.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 2852d0e76ea3..4f404fe1d9ab 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1983,6 +1983,8 @@ static __latent_entropy struct task_struct *copy_process(
p->sequential_io_avg = 0;
#endif

+ p->server = NULL;
+
/* Perform scheduler related setup. Assign this task to a CPU. */
retval = sched_fork(clone_flags, p);
if (retval)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1fd2a8c68daf..d72579b93a9f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3917,8 +3917,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
* This is the fast path; it cannot be a DL server pick;
* therefore even if @p == @prev, ->server must be NULL.
*/
- if (prev->server)
- p->server = NULL;
+ p->server = NULL;

return p;
}