Skip to contentSkip to conversation

ipc-account-for-kmem-usage-on-mqueue-and-msg.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 28, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: ipc: account for kmem usage on mqueue and msg
has been removed from the -mm tree. Its filename was
ipc-account-for-kmem-usage-on-mqueue-and-msg.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Aristeu Rozanski <[email protected]>
Subject: ipc: account for kmem usage on mqueue and msg

When kmem accounting switched from account by default to only account if flagged by __GFP_ACCOUNT, IPC mqueue and messages was left out.

The production use case at hand is that mqueues should be customizable via sysctls in Docker containers in a Kubernetes cluster. This can only be safely allowed to the users of the cluster (without the risk that they can cause resource shortage on a node, influencing other users' containers) if all resources they control are bounded, i.e. accounted for.

---

 ipc/msgutil.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ipc/msgutil.c renamed from ipc/msgutil.c~ipc-account-for-kmem-usage-on-mqueue-and-msg +2 -2
diff -puN ipc/msgutil.c~ipc-account-for-kmem-usage-on-mqueue-and-msg ipc/msgutil.c
@@ -53,7 +53,7 @@ static struct msg_msg *alloc_msg(size_t
 	size_t alen;
 
 	alen = min(len, DATALEN_MSG);
-	msg = kmalloc(sizeof(*msg) + alen, GFP_KERNEL);
+	msg = kmalloc(sizeof(*msg) + alen, GFP_KERNEL_ACCOUNT);
 	if (msg == NULL)
 		return NULL;
 
@@ -65,7 +65,7 @@ static struct msg_msg *alloc_msg(size_t
 	while (len > 0) {
 		struct msg_msgseg *seg;
 		alen = min(len, DATALEN_SEG);
-		seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL);
+		seg = kmalloc(sizeof(*seg) + alen, GFP_KERNEL_ACCOUNT);
 		if (seg == NULL)
 			goto out_err;
 		*pseg = seg;

_

Patches currently in -mm which might be from [email protected] are