Re: [Devel] [PATCH rh7] mm/memcg: Fix race on mem cgroup offline/kmem deactivation.

2020-05-08 Thread Kirill Tkhai
On 08.05.2020 19:10, Andrey Ryabinin wrote: > The following race could happen > > Initial state: kmem = 0, cgroup is online > > CPU0: >charge_kmem(1); //kmem = 1 >memcg_uncharge_kmem() >{ >... > kmem = page_counter_uncharge(&memcg->kmem, nr_pages); //kmem =

[Devel] [PATCH rh7] mm/memcg: Fix race on mem cgroup offline/kmem deactivation.

2020-05-08 Thread Andrey Ryabinin
The following race could happen Initial state: kmem = 0, cgroup is online CPU0: charge_kmem(1); //kmem = 1 memcg_uncharge_kmem() { ... kmem = page_counter_uncharge(&memcg->kmem, nr_pages); //kmem = 0 -