mbox series

[0/3] mm/memcg: some cleanup for mem_cgroup_iter()

Message ID 20220225003437.12620-1-richard.weiyang@gmail.com (mailing list archive)
Headers show
Series mm/memcg: some cleanup for mem_cgroup_iter() | expand

Message

Wei Yang Feb. 25, 2022, 12:34 a.m. UTC
No functional change, try to make it more readable.

Wei Yang (3):
  mm/memcg: set memcg after css verified and got reference
  mm/memcg: set pos to prev unconditionally
  mm/memcg: move generation assignment and comparison together

 mm/memcontrol.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

Comments

Michal Hocko Feb. 25, 2022, 8:13 a.m. UTC | #1
On Fri 25-02-22 00:34:34, Wei Yang wrote:
> No functional change, try to make it more readable.
> 
> Wei Yang (3):
>   mm/memcg: set memcg after css verified and got reference
>   mm/memcg: set pos to prev unconditionally
>   mm/memcg: move generation assignment and comparison together
> 
>  mm/memcontrol.c | 27 ++++++++++++---------------
>  1 file changed, 12 insertions(+), 15 deletions(-)

I am sorry but I do not really see these changes to be simplifying 
the iterator code enough to be worth touching the code. The iterator
code is really subtle and we have experienced some subtle bugs there.
I would be really reluctant to touch it unless the result is a clear
simplification or a bug fix. Please keep in mind that the review
overhead is far from negligible here.

Unless Johannes sees that as a clear improvement then I would suggest
dropping these patches from the akpm's tree.