On (24/02/20 11:36), Chengming Zhou wrote: > From: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx> > > The migrate write lock is to protect the race between zspage migration > and zspage objects' map users. > > We only need to lock out the map users of src zspage, not dst zspage, > which is safe to map by users concurrently, since we only need to do > obj_malloc() from dst zspage. > > So we can remove the migrate_write_lock_nested() use case. > > As we are here, cleanup the __zs_compact() by moving putback_zspage() > outside of migrate_write_unlock since we hold pool lock, no malloc or > free users can come in. > > Signed-off-by: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx> Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>