[PATCH 3/3/] fix mem_cgroup_watemark_ok (Was Re: [PATCH V6 00/10] memcg: per cgroup background reclaim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ying, I noticed this at test. please fix the code in your set.
==
if low_wmark_distance = 0, mem_cgroup_watermark_ok() returns
false when usage hits limit.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
---
 mm/memcontrol.c |    3 +++
 1 file changed, 3 insertions(+)

Index: mmotm-Apr14/mm/memcontrol.c
===================================================================
--- mmotm-Apr14.orig/mm/memcontrol.c
+++ mmotm-Apr14/mm/memcontrol.c
@@ -5062,6 +5062,9 @@ int mem_cgroup_watermark_ok(struct mem_c
 	long ret = 0;
 	int flags = CHARGE_WMARK_LOW | CHARGE_WMARK_HIGH;
 
+	if (!mem->low_wmark_distance)
+		return 1;
+
 	VM_BUG_ON((charge_flags & flags) == flags);
 
 	if (charge_flags & CHARGE_WMARK_LOW)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]