From: Juri Lelli <juri.lelli@arm.com>
To: Luca Abeni <luca.abeni@unitn.it>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Claudio Scordino <claudio@evidence.eu.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC v3 1/6] Track the active utilisation
Date: Tue, 8 Nov 2016 20:02:29 +0000 [thread overview]
Message-ID: <20161108200229.GA24076@ARMvm> (raw)
In-Reply-To: <20161108200956.35b3e7c7@utopia>
On 08/11/16 20:09, Luca Abeni wrote:
> Hi again,
>
> On Tue, 8 Nov 2016 18:53:09 +0000
> Juri Lelli <juri.lelli@arm.com> wrote:
> [...]
> > > > Also, AFAIU, do_exit() works on current and the TASK_DEAD case is
> > > > handled in finish_task_switch(), so I don't think we are taking
> > > > care of the "task is dying" condition.
> > > Ok, so I am missing something... The state is set to TASK_DEAD, and
> > > then schedule() is called... So, __schedule() sees the dying task as
> > > "prev" and invokes deactivate_task() with the DEQUEUE_SLEEP flag...
> > > After that, finish_task_switch() calls task_dead_dl(). Is this
> > > wrong? If not, why aren't we taking care of the "task is dying"
> > > condition?
> > >
> >
> > No, I think you are right. But, semantically this cleanup goes in
> > task_dead_dl(), IMHO.
> Just to be sure I understand correctly: you suggest to add a check for
> "state == TASK_DEAD" (skipping the cleanup if the condition is true) in
> dequeue_task_dl(), and to add a sub_running_bw() in task_dead_dl()...
> Is this understanding correct?
This is more ugly, I know. It makes probably sense though if we then need it in
the next patch. But you are saying the contrary (we don't actually need it), so
in that case we might just want to add a comment here explaining why we handle
the "task is dying" case together with "task is going to sleep" (so that I
don't forget? :).
>
> > It's most probably moot if it complicates
> > things, but it might be helpful to differentiate the case between a
> > task that is actually going to sleep (and for which we want to
> > activate the timer) and a task that is dying (and for which we want
> > to release bw immediately).
> I suspect the two cases should be handled in the same way :)
>
> > So, it actually matters for next patch,
> > not here. But, maybe we want to do things clean from start?
> You mean, because patch 2/6 adds
> + if (hrtimer_active(&p->dl.inactive_timer)) {
> + raw_spin_lock_irq(&task_rq(p)->lock);
> + sub_running_bw(&p->dl, dl_rq_of_se(&p->dl));
> + raw_spin_unlock_irq(&task_rq(p)->lock);
> + }
> in task_dead_dl()? I suspect this hunk is actually unneeded (worse, it
> is wrong :). I am trying to remember why it is there, but I cannot find
> any reason... In the next days, I'll run some tests to check if that
> hunk is actually needed. If yes, then I'll modify patch 1/6 as you
> suggest; if it is not needed, I'll remove it from patch 2/6 and I'll
> not do this change to patch 1/6... Is this ok?
>
I guess yes, if we don't need to differentiate. Maybe just add a comment as I
am saying above?
Thanks,
- Juri
next prev parent reply other threads:[~2016-11-08 20:02 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 14:06 [RFC v3 0/6] CPU reclaiming for SCHED_DEADLINE Luca Abeni
2016-10-24 14:06 ` [RFC v3 1/6] Track the active utilisation Luca Abeni
2016-10-25 9:09 ` Daniel Bristot de Oliveira
2016-10-25 9:29 ` luca abeni
2016-10-25 13:58 ` Steven Rostedt
2016-10-25 18:04 ` Luca Abeni
2016-11-18 14:23 ` Peter Zijlstra
2016-11-18 15:10 ` luca abeni
2016-11-18 15:28 ` Peter Zijlstra
2016-11-18 16:42 ` Steven Rostedt
2016-12-05 22:30 ` luca abeni
2016-12-06 8:35 ` Peter Zijlstra
2016-12-06 8:57 ` luca abeni
2016-12-06 13:47 ` luca abeni
2016-11-01 16:45 ` Juri Lelli
2016-11-01 21:10 ` luca abeni
2016-11-08 17:56 ` Juri Lelli
2016-11-08 18:17 ` Luca Abeni
2016-11-08 18:53 ` Juri Lelli
2016-11-08 19:09 ` Luca Abeni
2016-11-08 20:02 ` Juri Lelli [this message]
2016-11-09 15:25 ` luca abeni
2016-11-09 16:29 ` luca abeni
2016-11-18 14:55 ` Peter Zijlstra
2016-11-18 13:55 ` Peter Zijlstra
2016-11-18 15:06 ` luca abeni
2016-10-24 14:06 ` [RFC v3 2/6] Improve the tracking of " Luca Abeni
2016-11-01 16:46 ` Juri Lelli
2016-11-01 21:46 ` luca abeni
2016-11-02 2:35 ` luca abeni
2016-11-10 10:04 ` Juri Lelli
2016-11-10 11:56 ` Juri Lelli
2016-11-10 12:15 ` luca abeni
2016-11-10 12:34 ` Juri Lelli
2016-11-10 12:45 ` luca abeni
2016-11-02 2:41 ` luca abeni
2016-11-18 15:36 ` Peter Zijlstra
2016-11-18 15:56 ` luca abeni
2016-11-18 15:47 ` Peter Zijlstra
2016-11-18 16:06 ` luca abeni
2016-11-18 18:49 ` Peter Zijlstra
2016-10-24 14:06 ` [RFC v3 3/6] Fix the update of the total -deadline utilization Luca Abeni
2016-10-24 14:06 ` [RFC v3 4/6] GRUB accounting Luca Abeni
2016-10-24 14:06 ` [RFC v3 5/6] Do not reclaim the whole CPU bandwidth Luca Abeni
2016-10-24 14:06 ` [RFC v3 6/6] Make GRUB a task's flag 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=20161108200229.GA24076@ARMvm \
--to=juri.lelli@arm.com \
--cc=claudio@evidence.eu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.abeni@unitn.it \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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).