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


Groups > linux.kernel > #1444164

[PATCH 05/14] resource limits: track highwater mark of stack size

From Topi Miettinen <toiwoton@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 05/14] resource limits: track highwater mark of stack size
Date 2016-07-15 12:40 +0200
Message-ID <rV8Hg-5Li-35@gated-at.bofh.it> (permalink)
References <rV8Hf-5Li-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Track maximum stack size, to be able to configure
RLIMIT_STACK resource limits. The information is available
with taskstats and cgroupstats netlink socket.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
---
 mm/mmap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/mmap.c b/mm/mmap.c
index 0b10f56..305c456 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2019,6 +2019,8 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
 	if (security_vm_enough_memory_mm(mm, grow))
 		return -ENOMEM;
 
+	update_resource_highwatermark(RLIMIT_STACK, actual_size);
+
 	return 0;
 }
 
-- 
2.8.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 05/14] resource limits: track highwater mark of stack size Topi Miettinen <toiwoton@gmail.com> - 2016-07-15 12:40 +0200

csiph-web