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


Groups > linux.kernel > #1586662

Re: [PATCH v2 2/2] sched/deadline: Change the way to replenish runtime for sleep tasks

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] sched/deadline: Change the way to replenish runtime for sleep tasks
Date 2017-02-23 07:20 +0100
Message-ID <tdUUW-5HO-11@gated-at.bofh.it> (permalink)
References <tdS6J-3AY-3@gated-at.bofh.it> <tdS6K-3AY-5@gated-at.bofh.it> <tdS6J-3AY-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 23, 2017 at 12:18:48PM +0900, byungchul.park wrote:
> > Current code handles this by replenishing a runtime in hrtimer callback
> > for deadline. But this approach has room for improvement in two ways:
> > 
> >    1. No need to keep the hrtimer for a sleep task because it can be
> >       handled when waking it up.
> > 
> >    2. It will be replenished twice unnecessarily if the task sleeps for
> >       long time so that the deadline, assigned in the hrtimer callback,
> >       also passed. In other words, one happens in the callback and the
> >       other happens in update_dl_entiry() when waking it up.

I wanted to enhance not only the second but also the first, so remove
the unnecessary timer overhead for sleep tasks. It's possible but it
makes code too complecated and I won't do that.

I will resend a patch doing only the second one at the next spin.

Thank you,
Byungchul

> > @@ -981,6 +983,9 @@ static void dequeue_task_dl(struct rq *rq, struct
> > task_struct *p, int flags)
> >  {
> >  	update_curr_dl(rq);
> >  	__dequeue_task_dl(rq, p, flags);
> > +
> > +	if (flags & DEQUEUE_SLEEP)
> > +		hrtimer_try_to_cancel(&p->dl.dl_timer);
> 
> Sorry. I found I might have made a mistake. I might have to re-start the
> timer when waking it up if necessary. Let me think more.

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


Thread

RE: [PATCH v2 2/2] sched/deadline: Change the way to replenish runtime for sleep tasks "byungchul.park" <byungchul.park@lge.com> - 2017-02-23 04:20 +0100
  Re: [PATCH v2 2/2] sched/deadline: Change the way to replenish  runtime for sleep tasks Byungchul Park <byungchul.park@lge.com> - 2017-02-23 07:20 +0100

csiph-web