* + mm-memcg-set-pos-to-prev-unconditionally.patch added to -mm tree
@ 2022-02-28 5:37 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-02-28 5:37 UTC (permalink / raw)
To: mm-commits, shakeelb, roman.gushchin, mhocko, hannes,
richard.weiyang, akpm
The patch titled
Subject: mm/memcg: set pos to prev unconditionally
has been added to the -mm tree. Its filename is
mm-memcg-set-pos-to-prev-unconditionally.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-set-pos-to-prev-unconditionally.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-set-pos-to-prev-unconditionally.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Wei Yang <richard.weiyang@gmail.com>
Subject: mm/memcg: set pos to prev unconditionally
Current code sets pos to prev based on condition (prev && !reclaim), while
we can do this unconditionally.
Since:
* If !reclaim, pos is the same as prev no matter it is NULL or not.
* If reclaim, pos would be set properly from iter->position.
Link: https://lkml.kernel.org/r/20220225003437.12620-3-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/mm/memcontrol.c~mm-memcg-set-pos-to-prev-unconditionally
+++ a/mm/memcontrol.c
@@ -980,7 +980,7 @@ struct mem_cgroup *mem_cgroup_iter(struc
struct mem_cgroup_reclaim_iter *iter;
struct cgroup_subsys_state *css = NULL;
struct mem_cgroup *memcg = NULL;
- struct mem_cgroup *pos = NULL;
+ struct mem_cgroup *pos = prev;
if (mem_cgroup_disabled())
return NULL;
@@ -988,9 +988,6 @@ struct mem_cgroup *mem_cgroup_iter(struc
if (!root)
root = root_mem_cgroup;
- if (prev && !reclaim)
- pos = prev;
-
rcu_read_lock();
if (reclaim) {
_
Patches currently in -mm which might be from richard.weiyang@gmail.com are
mm-memcg-mem_cgroup_per_node-is-already-set-to-0-on-allocation.patch
mm-memcg-retrieve-parent-memcg-from-cssparent.patch
mm-memcg-set-memcg-after-css-verified-and-got-reference.patch
mm-memcg-set-pos-to-prev-unconditionally.patch
mm-memcg-move-generation-assignment-and-comparison-together.patch
mm-page_alloc-add-same-penalty-is-enough-to-get-round-robin-order.patch
mm-page_alloc-add-penalty-to-local_node.patch
memcg-do-not-tweak-node-in-alloc_mem_cgroup_per_node_info.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* + mm-memcg-set-pos-to-prev-unconditionally.patch added to -mm tree
@ 2022-02-25 2:31 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-02-25 2:31 UTC (permalink / raw)
To: mm-commits, shakeelb, roman.gushchin, mhocko, hannes,
richard.weiyang, akpm
The patch titled
Subject: mm/memcg: set pos to prev unconditionally
has been added to the -mm tree. Its filename is
mm-memcg-set-pos-to-prev-unconditionally.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-set-pos-to-prev-unconditionally.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-set-pos-to-prev-unconditionally.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Wei Yang <richard.weiyang@gmail.com>
Subject: mm/memcg: set pos to prev unconditionally
Current code sets pos to prev based on condition (prev && !reclaim), while
we can do this unconditionally.
Since:
* If !reclaim, pos is the same as prev no matter it is NULL or not.
* If reclaim, pos would be set properly from iter->position.
Link: https://lkml.kernel.org/r/20220225003437.12620-3-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memcontrol.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/mm/memcontrol.c~mm-memcg-set-pos-to-prev-unconditionally
+++ a/mm/memcontrol.c
@@ -1029,7 +1029,7 @@ struct mem_cgroup *mem_cgroup_iter(struc
struct mem_cgroup_reclaim_iter *iter;
struct cgroup_subsys_state *css = NULL;
struct mem_cgroup *memcg = NULL;
- struct mem_cgroup *pos = NULL;
+ struct mem_cgroup *pos = prev;
if (mem_cgroup_disabled())
return NULL;
@@ -1037,9 +1037,6 @@ struct mem_cgroup *mem_cgroup_iter(struc
if (!root)
root = root_mem_cgroup;
- if (prev && !reclaim)
- pos = prev;
-
rcu_read_lock();
if (reclaim) {
_
Patches currently in -mm which might be from richard.weiyang@gmail.com are
mm-memcg-mem_cgroup_per_node-is-already-set-to-0-on-allocation.patch
mm-memcg-retrieve-parent-memcg-from-cssparent.patch
mm-memcg-set-memcg-after-css-verified-and-got-reference.patch
mm-memcg-set-pos-to-prev-unconditionally.patch
mm-memcg-move-generation-assignment-and-comparison-together.patch
mm-page_alloc-add-same-penalty-is-enough-to-get-round-robin-order.patch
mm-page_alloc-add-penalty-to-local_node.patch
memcg-do-not-tweak-node-in-alloc_mem_cgroup_per_node_info.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-28 5:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 5:37 + mm-memcg-set-pos-to-prev-unconditionally.patch added to -mm tree Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2022-02-25 2:31 Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.