lkml.org 
[lkml]   [2020]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/19] mm: memcontrol: update page->mem_cgroup stability rules
On Fri 08-05-20 14:31:06, Johannes Weiner wrote:
> The previous patches have simplified the access rules around
> page->mem_cgroup somewhat:
>
> 1. We never change page->mem_cgroup while the page is isolated by
> somebody else. This was by far the biggest exception to our rules
> and it didn't stop at lock_page() or lock_page_memcg().
>
> 2. We charge pages before they get put into page tables now, so the
> somewhat fishy rule about "can be in page table as long as it's
> still locked" is now gone and boiled down to having an exclusive
> reference to the page.
>
> Document the new rules. Any of the following will stabilize the
> page->mem_cgroup association:
>
> - the page lock
> - LRU isolation
> - lock_page_memcg()
> - exclusive access to the page
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Reviewed-by: Alex Shi <alex.shi@linux.alibaba.com>
> Reviewed-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Thanks a lot this is a big improvement and simplification.

I have gone through the whole series finally. I have followed up where
necessary but overall this is really nice!

Sorry I couldn't jump in to review in time.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-06-11 11:41    [W:0.235 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site