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


Groups > linux.kernel > #1309953

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

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC 4/8] Improve the tracking of active utilisation
Date 2016-01-15 09:40 +0100
Message-ID <qR85k-3wp-15@gated-at.bofh.it> (permalink)
References <qQS0x-uX-3@gated-at.bofh.it> <qQS0x-uX-9@gated-at.bofh.it> <qQW4b-3gr-33@gated-at.bofh.it> <qR7LY-3lR-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jan 15, 2016 at 09:10:15AM +0100, Luca Abeni wrote:
> On 01/14/2016 08:47 PM, Peter Zijlstra wrote:
> >On Thu, Jan 14, 2016 at 04:24:49PM +0100, Luca Abeni wrote:
> >
> >>+	if (!hrtimer_is_queued(timer)) {
> >>+		hrtimer_start(timer, act, HRTIMER_MODE_ABS);
> >>+	}
> >>+
> >>+	if (hrtimer_active(timer) == 0) {
> >>+		printk("Problem activating inactive_timer!\n");
> >>+		clear_running_bw(dl_se, dl_rq);
> >>+		if (!dl_task(p)) {
> >>+			__dl_clear_params(p);
> >>+		}
> >>+	} else {
> >>+		get_task_struct(p);
> >
> >Ah, I missed that one. I would suggest putting that right _before_
> >hrtimer_start(), because hrtimer_start() guarantees the callback will
> >run.

> Ok. So, if I understand well, the "if (hrtimer_active(timer) == 0)" check
> is useless (or should be somehow revised)... Right?

Yes, ever since: c6eb3f70d448 ("hrtimer: Get rid of hrtimer softirq")
hrtimer_start() is guaranteed to work and result in a callback, even if
the time is in the past.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-14 16:30 +0100
  Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-14 18:20 +0100
    Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 07:50 +0100
  Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-14 20:50 +0100
    Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 10:30 +0100
    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
  Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-14 20:50 +0100
    Re: [RFC 4/8] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 09:20 +0100
      Re: [RFC 4/8] Improve the tracking of active utilisation Peter Zijlstra <peterz@infradead.org> - 2016-01-15 09:40 +0100

csiph-web