[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1468578983-28229-13-git-send-email-toiwoton@gmail.com>
Date: Fri, 15 Jul 2016 13:35:59 +0300
From: Topi Miettinen <toiwoton@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Topi Miettinen <toiwoton@...il.com>,
Michal Hocko <mhocko@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Marcus Gelderie <redmnic@...il.com>,
Doug Ledford <dledford@...hat.com>,
Al Viro <viro@...iv.linux.org.uk>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Vladimir Davydov <vdavydov@...tuozzo.com>
Subject: [PATCH 12/14] resource limits: track highwater mark of size of message queues
Track maximum size of message queues, to be able to configure
RLIMIT_MSGQUEUE resource limits. The information is available
with taskstats and cgroupstats netlink socket.
Signed-off-by: Topi Miettinen <toiwoton@...il.com>
---
ipc/mqueue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index ade739f..037ea47 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -287,6 +287,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
/* all is ok */
info->user = get_uid(u);
+ update_resource_highwatermark(RLIMIT_MSGQUEUE, u->mq_bytes);
} else if (S_ISDIR(mode)) {
inc_nlink(inode);
/* Some things misbehave if size == 0 on a directory */
--
2.8.1
Powered by blists - more mailing lists