Re: [PATCH 4/5] mm/swap_state: fix potential faulted in race in swap_ra_info()

2021-04-11 Thread Miaohe Lin
On 2021/4/12 8:55, Huang, Ying wrote: > Miaohe Lin writes: > >> On 2021/4/9 16:50, Huang, Ying wrote: >>> Miaohe Lin writes: >>> While we released the pte lock, somebody else might faulted in this pte. So we should check whether it's swap pte first to guard against such race or

Re: [PATCH 4/5] mm/swap_state: fix potential faulted in race in swap_ra_info()

2021-04-11 Thread Huang, Ying
Miaohe Lin writes: > On 2021/4/9 16:50, Huang, Ying wrote: >> Miaohe Lin writes: >> >>> While we released the pte lock, somebody else might faulted in this pte. >>> So we should check whether it's swap pte first to guard against such race >>> or swp_type would be unexpected. And we can also

Re: [PATCH 4/5] mm/swap_state: fix potential faulted in race in swap_ra_info()

2021-04-09 Thread Miaohe Lin
On 2021/4/9 16:50, Huang, Ying wrote: > Miaohe Lin writes: > >> While we released the pte lock, somebody else might faulted in this pte. >> So we should check whether it's swap pte first to guard against such race >> or swp_type would be unexpected. And we can also avoid some unnecessary >>

Re: [PATCH 4/5] mm/swap_state: fix potential faulted in race in swap_ra_info()

2021-04-09 Thread Huang, Ying
Miaohe Lin writes: > While we released the pte lock, somebody else might faulted in this pte. > So we should check whether it's swap pte first to guard against such race > or swp_type would be unexpected. And we can also avoid some unnecessary > readahead cpu cycles possibly. > > Fixes:

[PATCH 4/5] mm/swap_state: fix potential faulted in race in swap_ra_info()

2021-04-08 Thread Miaohe Lin
While we released the pte lock, somebody else might faulted in this pte. So we should check whether it's swap pte first to guard against such race or swp_type would be unexpected. And we can also avoid some unnecessary readahead cpu cycles possibly. Fixes: ec560175c0b6 ("mm, swap: VMA based swap