Skip to content

Commit b33e104

Browse files
akpm00torvalds
authored andcommitted
mm/list_lru.c: revert "mm/list_lru: optimize memcg_reparent_list_lru_node()"
Commit 405cc51 ("mm/list_lru: optimize memcg_reparent_list_lru_node()") has subtle races which are proving ugly to fix. Revert the original optimization. If quantitative testing indicates that we have a significant problem here then other implementations can be looked at. Fixes: 405cc51 ("mm/list_lru: optimize memcg_reparent_list_lru_node()") Acked-by: Shakeel Butt <shakeelb@google.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Waiman Long <longman@redhat.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0347b2b commit b33e104

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

mm/list_lru.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,6 @@ static void memcg_reparent_list_lru_node(struct list_lru *lru, int nid,
394394
int dst_idx = dst_memcg->kmemcg_id;
395395
struct list_lru_one *src, *dst;
396396

397-
/*
398-
* If there is no lru entry in this nlru, we can skip it immediately.
399-
*/
400-
if (!READ_ONCE(nlru->nr_items))
401-
return;
402-
403397
/*
404398
* Since list_lru_{add,del} may be called under an IRQ-safe lock,
405399
* we have to use IRQ-safe primitives here to avoid deadlock.

0 commit comments

Comments
 (0)