On 2021-09-29 12:09:05 [-0700], Minchan Kim wrote: > First of all, thanks for the patch, Sebastian. > > The zsmalloc is usually used with swap and swap size is normally several > GB above. Thus, adding per-page spinlock is rather expensive so I'd like to > consider the approach as last resort. About the lock contention, it's rare > so spinlock wouldn't help it much. > > Let me try changing the bit lock into sleepable lock in PREEMPT_RT with > bigger granuarity. Okay, thank you. spinlock_t has always four bytes without lockdep so you could fit twice as many locks compared to a long on 64bit ;) Sebastian