[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80d3be3d47356bf0bd6c5a9d9dc658ca3da292be.camel@gmx.de>
Date: Sun, 20 Dec 2020 08:47:36 +0100
From: Mike Galbraith <efault@....de>
To: Vitaly Wool <vitaly.wool@...sulko.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>
Cc: Barry Song <song.bao.hua@...ilicon.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Minchan Kim <minchan@...nel.org>,
NitinGupta <ngupta@...are.org>
Subject: Re: [PATCH] zsmalloc: do not use bit_spin_lock
On Sun, 2020-12-20 at 02:23 +0100, Mike Galbraith wrote:
> On Sun, 2020-12-20 at 02:22 +0200, Vitaly Wool wrote:
> > zsmalloc takes bit spinlock in its _map() callback and releases it
> > only in unmap() which is unsafe and leads to zswap complaining
> > about scheduling in atomic context.
> >
> > To fix that and to improve RT properties of zsmalloc, remove that
> > bit spinlock completely and use a bit flag instead.
>
> It also does get_cpu_var() in map(), put_cpu_var() in unmap().
That aside, the bit spinlock removal seems to hold up to beating in RT.
I stripped out the RT changes to replace the bit spinlocks, applied the
still needed atm might_sleep() fix, and ltp zram and zswap test are
running in a loop with no signs that it's a bad idea, so I hope that
makes it in (minus the preempt disabled spin which I whacked), as it
makes zsmalloc markedly more RT friendly.
RT changes go from:
1 file changed, 79 insertions(+), 6 deletions(-)
to:
1 file changed, 8 insertions(+), 3 deletions(-)
-Mike
Powered by blists - more mailing lists