Skip to contentSkip to conversation

memcg-correct-resource_max-to-ullong_max.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 13, 2013

lore
Share & tools
lore
#0 lore raw

Subject: [merged] memcg-correct-resource_max-to-ullong_max.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 13 Sep 2013 13:02:34 -0700

The patch titled
Subject: memcg: correct RESOURCE_MAX to ULLONG_MAX
has been removed from the -mm tree. Its filename was
memcg-correct-resource_max-to-ullong_max.patch

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

------------------------------------------------------
From: Sha Zhengju <[email protected]>
Subject: memcg: correct RESOURCE_MAX to ULLONG_MAX

Current RESOURCE_MAX is ULONG_MAX, but the value we used to set resource limit is unsigned long long, so we can set bigger value than that which is strange. The XXX_MAX should be reasonable max value, bigger than that should be overflow.

Notice that this change will affect user output of default *.limit_in_bytes:
before change:

$ cat /cgroup/memory/memory.limit_in_bytes
9223372036854775807

after change:

$ cat /cgroup/memory/memory.limit_in_bytes
18446744073709551615

But it doesn't alter the API in term of input - we can still use "echo -1

Quoted 1 line

*.limit_in_bytes" to reset the numbers to "unlimited".

---

 include/linux/res_counter.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/res_counter.h renamed from include/linux/res_counter.h~memcg-correct-resource_max-to-ullong_max +1 -1
diff -puN include/linux/res_counter.h~memcg-correct-resource_max-to-ullong_max include/linux/res_counter.h
@@ -54,7 +54,7 @@ struct res_counter {
 	struct res_counter *parent;
 };
 
-#define RESOURCE_MAX (unsigned long long)LLONG_MAX
+#define RESOURCE_MAX ULLONG_MAX
 
 /**
  * Helpers to interact with userspace

_

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

origin.patch