Re: [PATCH v4 4/4] mm: convert page kmemcg type to a page memcg flag
From: Michal Koutný
Date: Fri Oct 02 2020 - 06:03:55 EST
On Thu, Oct 01, 2020 at 01:27:13PM -0400, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> The activation code is the only path where page migration is not
> excluded. Because unlike with page state statistics, we don't really
> mind a race when counting an activation event.
Thanks for the explanation. I see why the accessor trio is justified.
> I do think there is a bug, though: mem_cgroup_move_account() should
> use WRITE_ONCE() on page->mem_cgroup.
If this were a bug, wouldn't be the proper approach
rcu_assign_pointer()/rcu_dereference() pair?
Michal
Attachment:
signature.asc
Description: Digital signature