mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/deadline: Remove redundant code replenishing runtime
@ 2017-02-10  9:11 Byungchul Park
  2017-02-10 13:39 ` Juri Lelli
  0 siblings, 1 reply; 8+ messages in thread
From: Byungchul Park @ 2017-02-10  9:11 UTC (permalink / raw)
  To: peterz, mingo; +Cc: linux-kernel, tkhai

For a task passing its deadline while !rq, it will be replenished
in the following path because dl_se->deadline < rq_lock.

   enqueue_dl_entity(ENQUEUE_WAKEUP)
      update_dl_entity

Therefore, code replenishing it in the timer callback in the case is
unnecessary. This is not for enhancing performance but just for removing
a redundant code.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 kernel/sched/deadline.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 27737f3..9c77696 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -624,10 +624,8 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
 	 * We can be both throttled and !queued. Replenish the counter
 	 * but do not enqueue -- wait for our wakeup to do that.
 	 */
-	if (!task_on_rq_queued(p)) {
-		replenish_dl_entity(dl_se, dl_se);
+	if (!task_on_rq_queued(p))
 		goto unlock;
-	}
 
 #ifdef CONFIG_SMP
 	if (unlikely(!rq->online)) {
-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-02-14 10:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  9:11 [PATCH] sched/deadline: Remove redundant code replenishing runtime Byungchul Park
2017-02-10 13:39 ` Juri Lelli
2017-02-13  2:30   ` Byungchul Park
2017-02-13  4:29     ` Byungchul Park
2017-02-13 15:24       ` Juri Lelli
2017-02-13 23:42         ` Byungchul Park
2017-02-14  2:06           ` Byungchul Park
2017-02-14 10:54             ` Juri Lelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®