From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932735AbcGOKid (ORCPT ); Fri, 15 Jul 2016 06:38:33 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33986 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932667AbcGOKhy (ORCPT ); Fri, 15 Jul 2016 06:37:54 -0400 From: Topi Miettinen To: linux-kernel@vger.kernel.org Cc: Topi Miettinen , Michal Hocko , Andrew Morton , Marcus Gelderie , Doug Ledford , Al Viro , "Kirill A. Shutemov" , Vladimir Davydov Subject: [PATCH 12/14] resource limits: track highwater mark of size of message queues Date: Fri, 15 Jul 2016 13:35:59 +0300 Message-Id: <1468578983-28229-13-git-send-email-toiwoton@gmail.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> References: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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