diff options
-rw-r--r-- | Documentation/cgroups/unified-hierarchy.txt | 4 | ||||
-rw-r--r-- | mm/memcontrol.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt index 71daa35ec2d9..eb102fb72213 100644 --- a/Documentation/cgroups/unified-hierarchy.txt +++ b/Documentation/cgroups/unified-hierarchy.txt | |||
@@ -404,8 +404,8 @@ supported and the interface files "release_agent" and | |||
404 | be understood as an underflow into the highest possible value, -2 or | 404 | be understood as an underflow into the highest possible value, -2 or |
405 | -10M etc. do not work, so it's not consistent. | 405 | -10M etc. do not work, so it's not consistent. |
406 | 406 | ||
407 | memory.low, memory.high, and memory.max will use the string | 407 | memory.low, memory.high, and memory.max will use the string "max" to |
408 | "infinity" to indicate and set the highest possible value. | 408 | indicate and set the highest possible value. |
409 | 409 | ||
410 | 5. Planned Changes | 410 | 5. Planned Changes |
411 | 411 | ||
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 76c5a1b1dd21..9fe07692eaad 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -5247,7 +5247,7 @@ static int memory_low_show(struct seq_file *m, void *v) | |||
5247 | unsigned long low = ACCESS_ONCE(memcg->low); | 5247 | unsigned long low = ACCESS_ONCE(memcg->low); |
5248 | 5248 | ||
5249 | if (low == PAGE_COUNTER_MAX) | 5249 | if (low == PAGE_COUNTER_MAX) |
5250 | seq_puts(m, "infinity\n"); | 5250 | seq_puts(m, "max\n"); |
5251 | else | 5251 | else |
5252 | seq_printf(m, "%llu\n", (u64)low * PAGE_SIZE); | 5252 | seq_printf(m, "%llu\n", (u64)low * PAGE_SIZE); |
5253 | 5253 | ||
@@ -5262,7 +5262,7 @@ static ssize_t memory_low_write(struct kernfs_open_file *of, | |||
5262 | int err; | 5262 | int err; |
5263 | 5263 | ||
5264 | buf = strstrip(buf); | 5264 | buf = strstrip(buf); |
5265 | err = page_counter_memparse(buf, "infinity", &low); | 5265 | err = page_counter_memparse(buf, "max", &low); |
5266 | if (err) | 5266 | if (err) |
5267 | return err; | 5267 | return err; |
5268 | 5268 | ||
@@ -5277,7 +5277,7 @@ static int memory_high_show(struct seq_file *m, void *v) | |||
5277 | unsigned long high = ACCESS_ONCE(memcg->high); | 5277 | unsigned long high = ACCESS_ONCE(memcg->high); |
5278 | 5278 | ||
5279 | if (high == PAGE_COUNTER_MAX) | 5279 | if (high == PAGE_COUNTER_MAX) |
5280 | seq_puts(m, "infinity\n"); | 5280 | seq_puts(m, "max\n"); |
5281 | else | 5281 | else |
5282 | seq_printf(m, "%llu\n", (u64)high * PAGE_SIZE); | 5282 | seq_printf(m, "%llu\n", (u64)high * PAGE_SIZE); |
5283 | 5283 | ||
@@ -5292,7 +5292,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of, | |||
5292 | int err; | 5292 | int err; |
5293 | 5293 | ||
5294 | buf = strstrip(buf); | 5294 | buf = strstrip(buf); |
5295 | err = page_counter_memparse(buf, "infinity", &high); | 5295 | err = page_counter_memparse(buf, "max", &high); |
5296 | if (err) | 5296 | if (err) |
5297 | return err; | 5297 | return err; |
5298 | 5298 | ||
@@ -5307,7 +5307,7 @@ static int memory_max_show(struct seq_file *m, void *v) | |||
5307 | unsigned long max = ACCESS_ONCE(memcg->memory.limit); | 5307 | unsigned long max = ACCESS_ONCE(memcg->memory.limit); |
5308 | 5308 | ||
5309 | if (max == PAGE_COUNTER_MAX) | 5309 | if (max == PAGE_COUNTER_MAX) |
5310 | seq_puts(m, "infinity\n"); | 5310 | seq_puts(m, "max\n"); |
5311 | else | 5311 | else |
5312 | seq_printf(m, "%llu\n", (u64)max * PAGE_SIZE); | 5312 | seq_printf(m, "%llu\n", (u64)max * PAGE_SIZE); |
5313 | 5313 | ||
@@ -5322,7 +5322,7 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, | |||
5322 | int err; | 5322 | int err; |
5323 | 5323 | ||
5324 | buf = strstrip(buf); | 5324 | buf = strstrip(buf); |
5325 | err = page_counter_memparse(buf, "infinity", &max); | 5325 | err = page_counter_memparse(buf, "max", &max); |
5326 | if (err) | 5326 | if (err) |
5327 | return err; | 5327 | return err; |
5328 | 5328 | ||