Skip to content

Commit 68f5503

Browse files
committed
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Ingo Molnar: "An autogroup nice level adjustment bug fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/autogroup: Fix 64-bit kernel nice level adjustment
2 parents bf7f1c7 + 83929cc commit 68f5503

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

kernel/sched/auto_group.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)
212212
{
213213
static unsigned long next = INITIAL_JIFFIES;
214214
struct autogroup *ag;
215+
unsigned long shares;
215216
int err;
216217

217218
if (nice < MIN_NICE || nice > MAX_NICE)
@@ -230,9 +231,10 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)
230231

231232
next = HZ / 10 + jiffies;
232233
ag = autogroup_task_get(p);
234+
shares = scale_load(sched_prio_to_weight[nice + 20]);
233235

234236
down_write(&ag->lock);
235-
err = sched_group_set_shares(ag->tg, sched_prio_to_weight[nice + 20]);
237+
err = sched_group_set_shares(ag->tg, shares);
236238
if (!err)
237239
ag->nice = nice;
238240
up_write(&ag->lock);

0 commit comments

Comments
 (0)