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


Groups > linux.kernel > #1537994 > unrolled thread

[GIT PULL] scheduler fix

Started byIngo Molnar <mingo@kernel.org>
First post2016-12-07 19:50 +0100
Last post2016-12-07 19:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [GIT PULL] scheduler fix Ingo Molnar <mingo@kernel.org> - 2016-12-07 19:50 +0100

#1537994 — [GIT PULL] scheduler fix

FromIngo Molnar <mingo@kernel.org>
Date2016-12-07 19:50 +0100
Subject[GIT PULL] scheduler fix
Message-ID<sLPrX-3Kn-19@gated-at.bofh.it>
Linus,

Please pull the latest sched-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus

   # HEAD: 83929cce95251cc77e5659bf493bd424ae0e7a67 sched/autogroup: Fix 64-bit kernel nice level adjustment

An autogroup nice level adjustment bug fix.

 Thanks,

	Ingo

------------------>
Mike Galbraith (1):
      sched/autogroup: Fix 64-bit kernel nice level adjustment


 kernel/sched/auto_group.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
index f1c8fd566246..da39489d2d80 100644
--- a/kernel/sched/auto_group.c
+++ b/kernel/sched/auto_group.c
@@ -212,6 +212,7 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)
 {
 	static unsigned long next = INITIAL_JIFFIES;
 	struct autogroup *ag;
+	unsigned long shares;
 	int err;
 
 	if (nice < MIN_NICE || nice > MAX_NICE)
@@ -230,9 +231,10 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)
 
 	next = HZ / 10 + jiffies;
 	ag = autogroup_task_get(p);
+	shares = scale_load(sched_prio_to_weight[nice + 20]);
 
 	down_write(&ag->lock);
-	err = sched_group_set_shares(ag->tg, sched_prio_to_weight[nice + 20]);
+	err = sched_group_set_shares(ag->tg, shares);
 	if (!err)
 		ag->nice = nice;
 	up_write(&ag->lock);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web