[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465847065-3577-17-git-send-email-toiwoton@gmail.com>
Date: Mon, 13 Jun 2016 22:44:23 +0300
From: Topi Miettinen <toiwoton@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Topi Miettinen <toiwoton@...il.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: [RFC 16/18] limits: track RLIMIT_NICE actual max
Track maximum nice priority, presented in /proc/self/limits.
Signed-off-by: Topi Miettinen <toiwoton@...il.com>
---
kernel/sched/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 017d539..817d720 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3692,6 +3692,8 @@ void set_user_nice(struct task_struct *p, long nice)
if (delta < 0 || (delta > 0 && task_running(rq, p)))
resched_curr(rq);
}
+ task_bump_rlimit(p, RLIMIT_NICE, nice_to_rlimit(nice));
+
out_unlock:
task_rq_unlock(rq, p, &rf);
}
--
2.8.1
Powered by blists - more mailing lists