[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1468578983-28229-14-git-send-email-toiwoton@gmail.com>
Date: Fri, 15 Jul 2016 13:36:00 +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: [PATCH 13/14] resource limits: track highwater mark of niceness
Track maximum nice priority, to be able to configure
RLIMIT_NICE resource limits. The information is available
with taskstats and cgroupstats netlink socket.
Signed-off-by: Topi Miettinen <toiwoton@...il.com>
---
kernel/sched/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 97ee9ac..da32bcd 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3693,6 +3693,9 @@ void set_user_nice(struct task_struct *p, long nice)
if (delta < 0 || (delta > 0 && task_running(rq, p)))
resched_curr(rq);
}
+ task_update_resource_highwatermark(p, RLIMIT_NICE,
+ nice_to_rlimit(nice));
+
out_unlock:
task_rq_unlock(rq, p, &rf);
}
--
2.8.1
Powered by blists - more mailing lists