Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-23 Thread Johannes Weiner
On Mon, Feb 22, 2021 at 10:38:27AM -0800, Tim Chen wrote: > Johannes, > > Thanks for your feedback. Since Michal has concerns about the overhead > this patch could incur, I think we'll hold the patch for now. If later > on Michal think that this patch is a good idea, I'll incorporate these >

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-22 Thread Tim Chen
On 2/17/21 9:56 PM, Johannes Weiner wrote: >> static inline void uncharge_gather_clear(struct uncharge_gather *ug) >> @@ -6849,7 +6850,13 @@ static void uncharge_page(struct page *page, struct >> uncharge_gather *ug) >> * exclusive access to the page. >> */ >> >> -if

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-22 Thread Tim Chen
On 2/22/21 12:41 AM, Michal Hocko wrote: >> >> >> Ah, that's true. The added check for soft_limit_excess is not needed. >> >> Do you think it is still a good idea to add patch 3 to >> restrict the uncharge update in page batch of the same node and cgroup? > > I would rather drop it. The less

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-22 Thread Michal Hocko
On Fri 19-02-21 11:28:47, Tim Chen wrote: > > > On 2/19/21 1:16 AM, Michal Hocko wrote: > > >> > >> Something like this? > >> > >> diff --git a/mm/memcontrol.c b/mm/memcontrol.c > >> index 8bddee75f5cb..b50cae3b2a1a 100644 > >> --- a/mm/memcontrol.c > >> +++ b/mm/memcontrol.c > >> @@ -3472,6

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-19 Thread Tim Chen
On 2/19/21 1:16 AM, Michal Hocko wrote: >> >> Something like this? >> >> diff --git a/mm/memcontrol.c b/mm/memcontrol.c >> index 8bddee75f5cb..b50cae3b2a1a 100644 >> --- a/mm/memcontrol.c >> +++ b/mm/memcontrol.c >> @@ -3472,6 +3472,14 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-19 Thread Michal Hocko
On Wed 17-02-21 12:41:36, Tim Chen wrote: > On a per node basis, the mem cgroup soft limit tree on each node tracks > how much a cgroup has exceeded its soft limit memory limit and sorts > the cgroup by its excess usage. On page release, the trees are not > updated right away, until we have

Re: [PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-17 Thread Johannes Weiner
On Wed, Feb 17, 2021 at 12:41:36PM -0800, Tim Chen wrote: > On a per node basis, the mem cgroup soft limit tree on each node tracks > how much a cgroup has exceeded its soft limit memory limit and sorts > the cgroup by its excess usage. On page release, the trees are not > updated right away,

[PATCH v2 3/3] mm: Fix missing mem cgroup soft limit tree updates

2021-02-17 Thread Tim Chen
On a per node basis, the mem cgroup soft limit tree on each node tracks how much a cgroup has exceeded its soft limit memory limit and sorts the cgroup by its excess usage. On page release, the trees are not updated right away, until we have gathered a batch of pages belonging to the same cgroup.