mm/memcg: swappiness should between 0 and 100
Subsystems (3)
PATCH 1/1 mm/memcg: swappiness should between 0 and 100
From: Wanpeng Li <[email protected]>
--- mm/memcontrol.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
mm/memcontrol.c +1 -1
@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent; -if (val >100 ) +if (val >100 || val <0 )return -EINVAL ;if (cgrp->parent ==NULL )
Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
mm/memcontrol.c static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
Quoted 12 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
Signed-off-by Wanpeng Li <[email protected]>---
mm/memcontrol.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)mm/memcontrol.c +0
-0@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
It seems that we don't have the function in mainline.
shangw@shangw:~/sandbox/linux/mm$ grep mem_cgroup_swappiness_write -r . shangw@shangw:~/sandbox/linux/mm$
Thanks,
Gavin
Quoted 17 lines
mm/memcontrol.c +1
-1struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent; -if (val >100 ) +if (val >100 || val <0 )return -EINVAL ;if (cgrp->parent ==NULL )Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 16 lines · Gavin Shan
mm/memcontrol.c static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
Quoted 12 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
Signed-off-by Wanpeng Li <[email protected]>---
mm/memcontrol.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)mm/memcontrol.c +0
-0@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,It seems that we don't have the function in mainline.
Quoted 3 lines
shangw@shangw:~/sandbox/linux/mm$ grep mem_cgroup_swappiness_write -r . shangw@shangw:~/sandbox/linux/mm$
Please ignore that cause my git tree has some problems and everything in linux/mm has been cleared :-)
Thanks,
Gavin
Quoted 27 lines
Thanks,
GavinQuoted 17 lines
mm/memcontrol.c +1
-1struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent; -if (val >100 ) +if (val >100 || val <0 )return -EINVAL ;if (cgrp->parent ==NULL )Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected] For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected] For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 17 lines · Gavin Shan
Quoted 16 lines · Gavin Shan
mm/memcontrol.c static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
Quoted 12 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
Signed-off-by Wanpeng Li <[email protected]>---
mm/memcontrol.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)mm/memcontrol.c +0
-0@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,It seems that we don't have the function in mainline.
Quoted 6 lines
Quoted 3 lines
shangw@shangw:~/sandbox/linux/mm$ grep mem_cgroup_swappiness_write -r . shangw@shangw:~/sandbox/linux/mm$Please ignore that cause my git tree has some problems and everything in linux/mm has been cleared :-)
No problem. :-)
Best Regards,
Wanpeng Li
Quoted 31 lines
Thanks,
GavinQuoted 27 lines
Thanks,
GavinQuoted 17 lines
mm/memcontrol.c +1
-1struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent; -if (val >100 ) +if (val >100 || val <0 )return -EINVAL ;if (cgrp->parent ==NULL )Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected] For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected] For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 12 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
Signed-off-by Wanpeng Li <[email protected]>---
mm/memcontrol.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)mm/memcontrol.c +0
-0
mm/memcontrol.c static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft, · line 4179
Quoted 5 lines
mm/memcontrol.c +1
-1@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent; -if (val >100 ) +if (val >100 || val <0 )
Wanpeng, the "val" was defined as "u64". So how it could be less than 0?
static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
u64 val)
Thanks,
Gavin
Quoted 12 lines
mm/memcontrol.c +0
-0return -EINVAL ;if (cgrp->parent ==NULL )Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 16 lines · Gavin Shan
Quoted 15 lines · Wanpeng Li
From: Wanpeng Li <[email protected]>
Signed-off-by Wanpeng Li <[email protected]>---
mm/memcontrol.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)mm/memcontrol.c +0
-0@@ -4176,7 +4176,7 @@ static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,struct mem_cgroup *memcg =mem_cgroup_from_cont (cgrp);struct mem_cgroup *parent;
Quoted 8 lines
mm/memcontrol.c static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft, · line 4179
Quoted 2 lines
mm/memcontrol.c +1
-1-if (val >100 ) +if (val >100 || val <0 )Wanpeng, the "val" was defined as "u64". So how it could be less than 0?
static int mem_cgroup_swappiness_write(struct cgroup *cgrp, struct cftype *cft,
u64 val)
Oh, thank you! Just ignore this patch.
Regards,
Wanpeng Li
Quoted 15 lines
Thanks,
GavinQuoted 12 lines
mm/memcontrol.c +0
-0return -EINVAL ;if (cgrp->parent ==NULL )Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>