From: Luca Abeni <luca.abeni@unitn.it>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@arm.com>
Subject: Re: [RFC 4/8] Improve the tracking of active utilisation
Date: Fri, 15 Jan 2016 07:48:41 +0100 [thread overview]
Message-ID: <20160115074841.0b863bee@luca-1225C> (raw)
In-Reply-To: <20160114171619.GZ6357@twins.programming.kicks-ass.net>
Hi Peter,
On Thu, 14 Jan 2016 18:16:19 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
[...]
> > + /* If the "inactive timer" is still active, stop it adn
> > leave
> > + * the active utilisation unchanged.
> > + * If it is running, increase the active utilisation
> > + */
> > + if (hrtimer_active(&dl_se->inactive_timer)) {
> > + hrtimer_try_to_cancel(&dl_se->inactive_timer);
>
> what if cancel fails?
Eh, this is a tricky point :)
In this case, the "if (p->state == TASK_RUNNING) {" in
inactive_task_timer() should detect what happened, and avoid decreasing
the active utilization. So, we should be safe... At least, this was my
plan, maybe I missed something.
> > @@ -1248,8 +1370,6 @@ static void task_fork_dl(struct task_struct
> > *p) static void task_dead_dl(struct task_struct *p)
> > {
> > struct dl_bw *dl_b = dl_bw_of(task_cpu(p));
> > - struct dl_rq *dl_rq = dl_rq_of_se(&p->dl);
> > - struct rq *rq = rq_of_dl_rq(dl_rq);
> >
> > /*
> > * Since we are TASK_DEAD we won't slip out of the domain!
> > @@ -1258,10 +1378,6 @@ static void task_dead_dl(struct task_struct
> > *p) /* XXX we should retain the bw until 0-lag */
> > dl_b->total_bw -= p->dl.dl_bw;
> > raw_spin_unlock_irq(&dl_b->lock);
> > -
> > - if (task_on_rq_queued(p)) {
> > - clear_running_bw(&p->dl, &rq->dl);
> > - }
>
> what happens if the timer is still active here? then we get the timer
> storage freed while enqueued?
I think here (and in the successive comment) we are safe because of the
get_task_struct() you mention in another email, right? Or am I missing
something else?
Thanks,
Luca
next prev parent reply other threads:[~2016-01-15 6:48 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 15:24 [RFC 0/8] CPU reclaiming for SCHED_DEADLINE Luca Abeni
2016-01-14 15:24 ` [RFC 1/8] Track the active utilisation Luca Abeni
2016-01-14 16:49 ` Peter Zijlstra
2016-01-15 6:37 ` Luca Abeni
2016-01-14 19:13 ` Peter Zijlstra
2016-01-15 8:07 ` Luca Abeni
2016-01-14 15:24 ` [RFC 2/8] Correctly track the active utilisation for migrating tasks Luca Abeni
2016-01-14 15:24 ` [RFC 3/8] sched/deadline: add some tracepoints Luca Abeni
2016-01-14 15:24 ` [RFC 4/8] Improve the tracking of active utilisation Luca Abeni
2016-01-14 17:16 ` Peter Zijlstra
2016-01-15 6:48 ` Luca Abeni [this message]
2016-01-14 19:43 ` Peter Zijlstra
2016-01-15 9:27 ` Luca Abeni
2016-01-19 12:20 ` Luca Abeni
2016-01-19 13:47 ` Peter Zijlstra
2016-01-27 13:36 ` Luca Abeni
2016-01-27 14:39 ` Peter Zijlstra
2016-01-27 14:45 ` Luca Abeni
2016-01-28 13:08 ` Vincent Guittot
[not found] ` <CAKfTPtAt0gTwk9aAZN238NT1O-zJvxVQDTh2QN_KxAnE61xMww@mail.gmail.com>
2016-01-28 13:48 ` luca abeni
2016-01-28 13:56 ` Vincent Guittot
2016-01-28 11:14 ` luca abeni
2016-01-28 12:21 ` Peter Zijlstra
2016-01-28 13:41 ` luca abeni
2016-01-28 14:00 ` Peter Zijlstra
2016-01-28 21:15 ` Luca Abeni
2016-01-14 19:47 ` Peter Zijlstra
2016-01-15 8:10 ` Luca Abeni
2016-01-15 8:32 ` Peter Zijlstra
2016-01-14 15:24 ` [RFC 5/8] Track the "total rq utilisation" too Luca Abeni
2016-01-14 19:12 ` Peter Zijlstra
2016-01-15 8:04 ` Luca Abeni
2016-01-14 19:48 ` Peter Zijlstra
2016-01-15 6:50 ` Luca Abeni
2016-01-15 8:34 ` Peter Zijlstra
2016-01-15 9:15 ` Luca Abeni
2016-01-29 15:06 ` Peter Zijlstra
2016-01-29 21:21 ` Luca Abeni
2016-01-14 15:24 ` [RFC 6/8] GRUB accounting Luca Abeni
2016-01-14 19:50 ` Peter Zijlstra
2016-01-15 8:05 ` Luca Abeni
2016-01-14 15:24 ` [RFC 7/8] Make GRUB a task's flag Luca Abeni
2016-01-14 19:56 ` Peter Zijlstra
2016-01-15 8:15 ` Luca Abeni
2016-01-15 8:41 ` Peter Zijlstra
2016-01-15 9:08 ` Luca Abeni
2016-01-14 15:24 ` [RFC 8/8] Do not reclaim the whole CPU bandwidth Luca Abeni
2016-01-14 19:59 ` Peter Zijlstra
2016-01-15 8:21 ` Luca Abeni
2016-01-15 8:50 ` Peter Zijlstra
2016-01-15 9:49 ` Luca Abeni
2016-01-26 12:52 ` luca abeni
2016-01-27 14:44 ` Peter Zijlstra
2016-02-02 20:53 ` Luca Abeni
2016-02-03 11:30 ` Juri Lelli
2016-02-03 13:28 ` luca abeni
2016-01-19 10:11 ` [RFC 0/8] CPU reclaiming for SCHED_DEADLINE Juri Lelli
2016-01-19 11:50 ` Luca Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160115074841.0b863bee@luca-1225C \
--to=luca.abeni@unitn.it \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).