[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160819132549.GG10121@twins.programming.kicks-ass.net>
Date: Fri, 19 Aug 2016 15:25:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Wanpeng Li <kernellwp@...il.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Wanpeng Li <wanpeng.li@...mail.com>,
Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@....com>,
Luca Abeni <luca.abeni@...tn.it>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH v3] sched/deadline: Fix the intention to re-evalute tick
dependency for offline cpu
On Fri, Aug 12, 2016 at 05:24:03PM +0800, Wanpeng Li wrote:
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index d091f4a..ce0fb00 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -641,6 +641,11 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
> goto unlock;
> }
>
> +#ifdef CONFIG_SMP
> + if (unlikely(!rq->online))
> + goto offline;
> +#endif
> +
> enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
> if (dl_task(rq->curr))
> check_preempt_curr_dl(rq, p, 0);
> @@ -648,6 +653,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
> resched_curr(rq);
>
> #ifdef CONFIG_SMP
> +offline:
> /*
> * Perform balancing operations here; after the replenishments. We
> * cannot drop rq->lock before this, otherwise the assertion in
> @@ -659,6 +665,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
> * XXX figure out if select_task_rq_dl() deals with offline cpus.
> */
> if (unlikely(!rq->online)) {
> + replenish_dl_entity(dl_se, dl_se);
> lockdep_unpin_lock(&rq->lock, rf.cookie);
> rq = dl_task_offline_migration(rq, p);
So I don't like this, even if it magically works. With this we end up
calling dl_task_offline_migration() -> deactivate_task() while the task
isn't on the runqueue at all.
> rf.cookie = lockdep_pin_lock(&rq->lock);
> --
> 1.9.1
>
Powered by blists - more mailing lists