All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Claudio Scordino <claudio@evidence.eu.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC v3 2/6] Improve the tracking of active utilisation
Date: Fri, 18 Nov 2016 16:56:47 +0100	[thread overview]
Message-ID: <20161118165647.46f8c867@sweethome> (raw)
In-Reply-To: <20161118153615.GM3142@twins.programming.kicks-ass.net>

On Fri, 18 Nov 2016 16:36:15 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> On Mon, Oct 24, 2016 at 04:06:34PM +0200, Luca Abeni wrote:
> > @@ -514,7 +556,20 @@ static void update_dl_entity(struct
> > sched_dl_entity *dl_se, struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
> >  	struct rq *rq = rq_of_dl_rq(dl_rq);
> >  
> > +	if (hrtimer_is_queued(&dl_se->inactive_timer)) {
> > +		hrtimer_try_to_cancel(&dl_se->inactive_timer);
> > +		WARN_ON(dl_task_of(dl_se)->nr_cpus_allowed > 1);  
> 
> Isn't that always so? That is, DL tasks cannot be but 'global', right?
Well, if I understand well in general (that is, if admission control is
enabled) nr_cpus_allowed is equal to the number of CPUs in the
cpuset...
This is generally > 1 (and in this case select_task_rq_dl() is invoked
first, and tries to cancel the timer - so I think the timer cannot be
queued), or can be = 1 if we do partitioned scheduling (cpusets
containing only 1 CPU, or disabled admission control). If
nr_cpus_allowed is 1, then select_task_rq_dl() is not invoked, so the
timer can be queued.
In some of my tests I used partitioned scheduling; in some other tests
I disabled admission control to mix tasks with different affinities, so
I made the warning conditional to the number of CPUs being > 1.


> Also, you could use the return value of hrtimer_try_to_cancel() to
> determine hrtimer_is_queued() I suppose.

Ah, ok... I was under the impression that
"if (hrtimer_is_queued()) hrtimer_try_to_cancel()"
is less overhead than a simple "hrtimer_try_to_cancel()", but this was
just an uneducated guess... I'll change the code to avoid the check on
hrtimer_is_queued().

> 
> > +	} else {
> > +		/*
> > +		 * The "inactive timer" has been cancelled in
> > +		 * select_task_rq_dl() (and the acvive utilisation
> > has
> > +		 * been decreased). So, increase the active
> > utilisation.
> > +		 * If select_task_rq_dl() could not cancel the
> > timer,
> > +		 * inactive_task_timer() will * find the task
> > state as  
>                                              ^^^
> superfluous '*'?

Yes, sorry... Something went wrong when I re-indented the comment :(


			Thanks,
				Luca

  reply	other threads:[~2016-11-18 15:56 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
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 [this message]
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=20161118165647.46f8c867@sweethome \
    --to=luca.abeni@unitn.it \
    --cc=claudio@evidence.eu.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.