From: Byungchul Park <byungchul.park@lge.com>
To: <peterz@infradead.org>, <mingo@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <juri.lelli@gmail.com>,
<rostedt@goodmis.org>, <kernel-team@lge.com>
Subject: Re: [PATCH v2 2/2] sched/deadline: Change the way to replenish runtime for sleep tasks
Date: Thu, 23 Feb 2017 15:14:20 +0900 [thread overview]
Message-ID: <20170223061420.GD3817@X58A-UD3R> (raw)
In-Reply-To: <008a01d28d83$8d0605a0$a71210e0$@lge.com>
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.
prev parent reply other threads:[~2017-02-23 6:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 3:10 [PATCH v2 1/2] sched/deadline: Factor out the actual work replenishing runtime Byungchul Park
2017-02-23 3:10 ` [PATCH v2 2/2] sched/deadline: Change the way to replenish runtime for sleep tasks Byungchul Park
2017-02-23 3:18 ` byungchul.park
2017-02-23 6:14 ` Byungchul Park [this message]
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=20170223061420.GD3817@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=juri.lelli@gmail.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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