Re: [PATCH] mm/frontswap: fix frontswap_register_ops() race with swapon and swapoff

2021-04-11 Thread Miaohe Lin
On 2021/4/11 4:02, Yu Zhao wrote: > On Sat, Apr 10, 2021 at 5:01 AM Miaohe Lin wrote: >> >> On 2021/4/10 18:42, Yu Zhao wrote: >>> On Sat, Apr 10, 2021 at 1:30 AM Miaohe Lin wrote: Hi: On 2021/4/5 18:20, Miaohe Lin wrote: > frontswap_register_ops can race with swapon. Consider

Re: [PATCH] mm/frontswap: fix frontswap_register_ops() race with swapon and swapoff

2021-04-10 Thread Yu Zhao
On Sat, Apr 10, 2021 at 5:01 AM Miaohe Lin wrote: > > On 2021/4/10 18:42, Yu Zhao wrote: > > On Sat, Apr 10, 2021 at 1:30 AM Miaohe Lin wrote: > >> > >> Hi: > >> On 2021/4/5 18:20, Miaohe Lin wrote: > >>> frontswap_register_ops can race with swapon. Consider the following scene: > >> > >> Any

Re: [PATCH] mm/frontswap: fix frontswap_register_ops() race with swapon and swapoff

2021-04-10 Thread Miaohe Lin
On 2021/4/10 18:42, Yu Zhao wrote: > On Sat, Apr 10, 2021 at 1:30 AM Miaohe Lin wrote: >> >> Hi: >> On 2021/4/5 18:20, Miaohe Lin wrote: >>> frontswap_register_ops can race with swapon. Consider the following scene: >> >> Any comment or suggestion? Or is this race window too theoretical to fix?

Re: [PATCH] mm/frontswap: fix frontswap_register_ops() race with swapon and swapoff

2021-04-10 Thread Yu Zhao
On Sat, Apr 10, 2021 at 1:30 AM Miaohe Lin wrote: > > Hi: > On 2021/4/5 18:20, Miaohe Lin wrote: > > frontswap_register_ops can race with swapon. Consider the following scene: > > Any comment or suggestion? Or is this race window too theoretical to fix? > Thanks. Let me run a stress test and get

Re: [PATCH] mm/frontswap: fix frontswap_register_ops() race with swapon and swapoff

2021-04-10 Thread Miaohe Lin
Hi: On 2021/4/5 18:20, Miaohe Lin wrote: > frontswap_register_ops can race with swapon. Consider the following scene: Any comment or suggestion? Or is this race window too theoretical to fix? Thanks. > > CPU1 CPU2 > >