|
@@ -5344,14 +5344,14 @@ struct cgroup_subsys memory_cgrp_subsys = {
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
- * mem_cgroup_low - check if memory consumption is below the normal range
|
|
|
|
|
|
+ * mem_cgroup_low - check if memory consumption is in the normal range
|
|
* @root: the top ancestor of the sub-tree being checked
|
|
* @root: the top ancestor of the sub-tree being checked
|
|
* @memcg: the memory cgroup to check
|
|
* @memcg: the memory cgroup to check
|
|
*
|
|
*
|
|
* WARNING: This function is not stateless! It can only be used as part
|
|
* WARNING: This function is not stateless! It can only be used as part
|
|
* of a top-down tree iteration, not for isolated queries.
|
|
* of a top-down tree iteration, not for isolated queries.
|
|
*
|
|
*
|
|
- * Returns %true if memory consumption of @memcg is below the normal range.
|
|
|
|
|
|
+ * Returns %true if memory consumption of @memcg is in the normal range.
|
|
*
|
|
*
|
|
* @root is exclusive; it is never low when looked at directly
|
|
* @root is exclusive; it is never low when looked at directly
|
|
*
|
|
*
|
|
@@ -5445,7 +5445,7 @@ bool mem_cgroup_low(struct mem_cgroup *root, struct mem_cgroup *memcg)
|
|
elow = min(elow, parent_elow * low_usage / siblings_low_usage);
|
|
elow = min(elow, parent_elow * low_usage / siblings_low_usage);
|
|
exit:
|
|
exit:
|
|
memcg->memory.elow = elow;
|
|
memcg->memory.elow = elow;
|
|
- return usage < elow;
|
|
|
|
|
|
+ return usage && usage <= elow;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|