lkml.org 
[lkml]   [2015]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v3] sched/rt: Use IPI to trigger RT task push migration instead of pulling
On Wed, 25 Feb 2015 22:26:44 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> +static int find_next_push_cpu(struct rq *rq)
> +{
> + struct rq *next_rq;
> + int cpu;
> +
> + while (1) {
> + cpu = rto_next_cpu(rq);
> + if (cpu >= nr_cpu_ids)
> + break;
> + next_rq = cpu_rq(cpu);
> +
> + /* Make sure the next rq can push to this rq */
> + if (next_rq->rt.highest_prio.next <
> + rq->rt.highest_prio.curr &&

> + next_rq->rt.highest_prio.next <
> + rq->rt.highest_prio.next)

OK, this second comparison is not needed. I was looking at the code in
more detail, and see that the .curr is updated when a new task is
enqueued, and it does not represent the task currently running, but the
highest priority task that is on the rq.

I'll be sending a v4 soon with this update.

-- Steve

> + break;
> + }
> +
> + return cpu;
> +}


\
 
 \ /
  Last update: 2015-02-26 17:21    [W:0.044 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site