Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1312178 > unrolled thread

Re: [RFC 4/8] Improve the tracking of active utilisation

Started byLuca Abeni <luca.abeni@unitn.it>
First post2016-01-19 13:30 +0100
Last post2016-01-27 15:50 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-19 13:30 +0100
    Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-19 14:50 +0100
      Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-27 14:40 +0100
        Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-27 15:40 +0100
          Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-27 15:50 +0100

#1312178 — Re: [RFC 4/8] Improve the tracking of active utilisation

FromLuca Abeni <luca.abeni@unitn.it>
Date2016-01-19 13:30 +0100
SubjectRe: [RFC 4/8] Improve the tracking of active utilisation
Message-ID<qSDA5-7Pd-13@gated-at.bofh.it>
Hi Peter,

On 01/14/2016 08:43 PM, Peter Zijlstra wrote:
> On Thu, Jan 14, 2016 at 04:24:49PM +0100, Luca Abeni wrote:
>> This patch implements a more theoretically sound algorithm for
>> thracking the active utilisation: instead of decreasing it when a
>> task blocks, use a timer (the "inactive timer", named after the
>> "Inactive" task state of the GRUB algorithm) to decrease the
>> active utilisaation at the so called "0-lag time".
>
> See also the large-ish comment in __setparam_dl().
>
> If we go do proper 0-lag, as GRUB requires, then we might as well use it
> for that.
Just to check if I understand correctly:
I would need to remove "dl_b->total_bw -= p->dl.dl_bw;" from task_dead_dl(),
and __dl_clear() from "else if (!dl_policy(policy) && task_has_dl_policy(p))"
in dl_overflow(). Then, arm the inactive_timer in these cases, and add the
__dl_clear() in the "if (!dl_task(p))" in inactive_task_timer()... Right?

If this understanding is correct (modulo some details that I'll figure out
during testing), I'll try this.

In theory, the inactive_timer would be the right place to also decrease
the active utilisation when a task switches from SCHED_DEADLINE to something
else... But this is problematic if the task migrates after switching from
SCHED_DEADLINE and before the timer fires.



			Thanks,
				Luca

[toc] | [next] | [standalone]


#1312249

FromPeter Zijlstra <peterz@infradead.org>
Date2016-01-19 14:50 +0100
Message-ID<qSEPw-8d-21@gated-at.bofh.it>
In reply to#1312178
On Tue, Jan 19, 2016 at 01:20:13PM +0100, Luca Abeni wrote:
> Hi Peter,
> 
> On 01/14/2016 08:43 PM, Peter Zijlstra wrote:
> >On Thu, Jan 14, 2016 at 04:24:49PM +0100, Luca Abeni wrote:
> >>This patch implements a more theoretically sound algorithm for
> >>thracking the active utilisation: instead of decreasing it when a
> >>task blocks, use a timer (the "inactive timer", named after the
> >>"Inactive" task state of the GRUB algorithm) to decrease the
> >>active utilisaation at the so called "0-lag time".
> >
> >See also the large-ish comment in __setparam_dl().
> >
> >If we go do proper 0-lag, as GRUB requires, then we might as well use it
> >for that.
> Just to check if I understand correctly:
> I would need to remove "dl_b->total_bw -= p->dl.dl_bw;" from task_dead_dl(),
> and __dl_clear() from "else if (!dl_policy(policy) && task_has_dl_policy(p))"
> in dl_overflow(). Then, arm the inactive_timer in these cases, and add the
> __dl_clear() in the "if (!dl_task(p))" in inactive_task_timer()... Right?

Correct.

> If this understanding is correct (modulo some details that I'll figure out
> during testing), I'll try this.

Yes, there's bound to be 'fun' details..

> In theory, the inactive_timer would be the right place to also decrease
> the active utilisation when a task switches from SCHED_DEADLINE to something
> else... But this is problematic if the task migrates after switching from
> SCHED_DEADLINE and before the timer fires.

urgh, yes.. details :-)

[toc] | [prev] | [next] | [standalone]


#1318949

FromLuca Abeni <luca.abeni@unitn.it>
Date2016-01-27 14:40 +0100
Message-ID<qVyue-49M-13@gated-at.bofh.it>
In reply to#1312249
Hi Peter,

On Tue, 19 Jan 2016 14:47:39 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
> On Tue, Jan 19, 2016 at 01:20:13PM +0100, Luca Abeni wrote:
> > Hi Peter,
> > 
> > On 01/14/2016 08:43 PM, Peter Zijlstra wrote:
> > >On Thu, Jan 14, 2016 at 04:24:49PM +0100, Luca Abeni wrote:
> > >>This patch implements a more theoretically sound algorithm for
> > >>thracking the active utilisation: instead of decreasing it when a
> > >>task blocks, use a timer (the "inactive timer", named after the
> > >>"Inactive" task state of the GRUB algorithm) to decrease the
> > >>active utilisaation at the so called "0-lag time".
> > >
> > >See also the large-ish comment in __setparam_dl().
> > >
> > >If we go do proper 0-lag, as GRUB requires, then we might as well
> > >use it for that.
> > Just to check if I understand correctly:
> > I would need to remove "dl_b->total_bw -= p->dl.dl_bw;" from
> > task_dead_dl(), and __dl_clear() from "else if (!dl_policy(policy)
> > && task_has_dl_policy(p))" in dl_overflow(). Then, arm the
> > inactive_timer in these cases, and add the __dl_clear() in the "if
> > (!dl_task(p))" in inactive_task_timer()... Right?
> 
> Correct.
> 
> > If this understanding is correct (modulo some details that I'll
> > figure out during testing), I'll try this.
> 
> Yes, there's bound to be 'fun' details..

Ok, so I implemented this idea, and I am currently testing it...
The first experiments seem to show that there are no problems, but I
just tried some simple workload (rt-app, or some other periodic taskset
scheduled by SCHED_DEADLINE). Do you have suggestions for more
"interesting" (and meaningful) tests/experiments?


			Thanks,
				Luca

[toc] | [prev] | [next] | [standalone]


#1319028

FromPeter Zijlstra <peterz@infradead.org>
Date2016-01-27 15:40 +0100
Message-ID<qVzqi-4RW-31@gated-at.bofh.it>
In reply to#1318949
On Wed, Jan 27, 2016 at 02:36:51PM +0100, Luca Abeni wrote:
> Ok, so I implemented this idea, and I am currently testing it...
> The first experiments seem to show that there are no problems, but I
> just tried some simple workload (rt-app, or some other periodic taskset
> scheduled by SCHED_DEADLINE). Do you have suggestions for more
> "interesting" (and meaningful) tests/experiments?

rt-app is the workload generator, right?

I think the most interesting part here is the switched_from path, so
you'd want the workload to include a !rt task that gets PI boosted to
deadline every so often.

Also, does rt-app let tasks die? Or does it spawn N tasks and lets them
run jobs until the end? I think you want to put some effort in
task_dead_dl() as well.

After that, just make sure rt-app generates a _lot_ of tasks such that
the migration thing gets used.

Other than that, no, not really :-)

[toc] | [prev] | [next] | [standalone]


#1319034

FromLuca Abeni <luca.abeni@unitn.it>
Date2016-01-27 15:50 +0100
Message-ID<qVzzX-4VL-7@gated-at.bofh.it>
In reply to#1319028
Hi Peter,

On Wed, 27 Jan 2016 15:39:46 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, Jan 27, 2016 at 02:36:51PM +0100, Luca Abeni wrote:
> > Ok, so I implemented this idea, and I am currently testing it...
> > The first experiments seem to show that there are no problems, but I
> > just tried some simple workload (rt-app, or some other periodic
> > taskset scheduled by SCHED_DEADLINE). Do you have suggestions for
> > more "interesting" (and meaningful) tests/experiments?
> 
> rt-app is the workload generator, right?
> 
> I think the most interesting part here is the switched_from path, so
> you'd want the workload to include a !rt task that gets PI boosted to
> deadline every so often.
> 
> Also, does rt-app let tasks die? Or does it spawn N tasks and lets
> them run jobs until the end? I think you want to put some effort in
> task_dead_dl() as well.
> 
> After that, just make sure rt-app generates a _lot_ of tasks such that
> the migration thing gets used.

Thanks; I'll check with Juri how to do all of this with rt-app (or how
to modify rt-app to stress these functionalities).


			Thanks,
				Luca

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web