[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABdmKX1PhoEHuVWAZGcF175-7fhxptY57feg0M8RK4hcePFXfw@mail.gmail.com>
Date: Wed, 28 Aug 2024 10:49:12 -0700
From: "T.J. Mercier" <tjmercier@...gle.com>
To: Kinsey Ho <kinseyho@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
Yosry Ahmed <yosryahmed@...gle.com>, Roman Gushchin <roman.gushchin@...ux.dev>,
Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>,
Shakeel Butt <shakeel.butt@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>, mkoutny@...e.com
Subject: Re: [PATCH mm-unstable v3 3/5] mm: increment gen # before restarting traversal
On Tue, Aug 27, 2024 at 4:11 PM Kinsey Ho <kinseyho@...gle.com> wrote:
>
> The generation number in struct mem_cgroup_reclaim_iter should be
> incremented on every round-trip. Currently, it is possible for a
> concurrent reclaimer to jump in at the end of the hierarchy, causing a
> traversal restart (resetting the iteration position) without
> incrementing the generation number.
>
> By resetting the position without incrementing the generation, it's
> possible for another ongoing mem_cgroup_iter() thread to walk the tree
> twice.
>
> Move the traversal restart such that the generation number is
> incremented before the restart.
>
> Signed-off-by: Kinsey Ho <kinseyho@...gle.com>
Reviewed-by: T.J. Mercier <tjmercier@...gle.com>
Powered by blists - more mailing lists