mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gregory Haskins <ghaskins@novell.com>
To: stable@vger.kernel.org, linux-rt-users@vger.kernel.org,
	rostedt@goodmis.org, mingo@elte.hu
Cc: peterz@infradead.org, ghaskins@novell.com, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] sched: remove extraneous load manipulations
Date: Thu, 03 Jul 2008 15:37:11 -0600	[thread overview]
Message-ID: <20080703213711.1275.56107.stgit@lsg.lsg.lab.novell.com> (raw)
In-Reply-To: <20080703212939.1275.27072.stgit@lsg.lsg.lab.novell.com>

commit 62fb185130e4d420f71a30ff59d8b16b74ef5d2b reverted some patches
in the scheduler, but it looks like it may have left a few redundant
calls to inc_load/dec_load remain in set_user_nice (since the
 dequeue_task/enqueue_task take care of the load.  This could result
in the load values being off since the load may change while dequeued.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Ingo Molnar <mingo@elte.hu>
---

 kernel/sched.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 31f91d9..b046754 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4679,10 +4679,8 @@ void set_user_nice(struct task_struct *p, long nice)
 		goto out_unlock;
 	}
 	on_rq = p->se.on_rq;
-	if (on_rq) {
+	if (on_rq)
 		dequeue_task(rq, p, 0);
-		dec_load(rq, p);
-	}
 
 	p->static_prio = NICE_TO_PRIO(nice);
 	set_load_weight(p);
@@ -4692,7 +4690,7 @@ void set_user_nice(struct task_struct *p, long nice)
 
 	if (on_rq) {
 		enqueue_task(rq, p, 0);
-		inc_load(rq, p);
+
 		/*
 		 * If the task increased its priority or is running and
 		 * lowered its priority, then reschedule its CPU:


  reply	other threads:[~2008-07-03 21:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 21:37 [PATCH 0/2] sched: misc fixes for stable-25.y and 25-rt Gregory Haskins
2008-07-03 21:37 ` Gregory Haskins [this message]
2008-07-18 12:39   ` [PATCH 1/2] sched: remove extraneous load manipulations Peter Zijlstra
2008-07-18 12:53     ` Gregory Haskins
2008-07-21 22:06     ` Gregory Haskins
2008-07-03 21:37 ` [PATCH 2/2] sched: readjust the load whenever task_setprio() is invoked Gregory Haskins
2008-07-18 12:43   ` Peter Zijlstra
2008-07-18 13:01     ` [PATCH 2/2] sched: readjust the load whenever task_setprio()is invoked Gregory Haskins

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=20080703213711.1275.56107.stgit@lsg.lsg.lab.novell.com \
    --to=ghaskins@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®