Re: [PATCH] mm: fix a race on nr_swap_pages

2020-12-03 Thread Vlastimil Babka
On 12/3/20 12:36 PM, Zhaoyang Huang wrote: > The scenario on which "Free swap -4kB" happens in my system, which is caused > by > get_swap_page_of_type or get_swap_pages racing with show_mem. Remove the race > here. > > Signed-off-by: Zhaoyang Huang > --- > mm/swapfile.c | 7 +++ > 1 file

Re: [PATCH] mm: fix a race on nr_swap_pages

2020-12-03 Thread Zhaoyang Huang
It is show_swap_cache_info() which races with get_swap_xxx On Thu, Dec 3, 2020 at 7:36 PM Zhaoyang Huang wrote: > > The scenario on which "Free swap -4kB" happens in my system, which is caused > by > get_swap_page_of_type or get_swap_pages racing with show_mem. Remove the race > here. > >

[PATCH] mm: fix a race on nr_swap_pages

2020-12-03 Thread Zhaoyang Huang
The scenario on which "Free swap -4kB" happens in my system, which is caused by get_swap_page_of_type or get_swap_pages racing with show_mem. Remove the race here. Signed-off-by: Zhaoyang Huang --- mm/swapfile.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git