[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <B926444035E5E2439431908E3842AFD24AFEC5@DGGEMI525-MBS.china.huawei.com>
Date: Tue, 19 May 2020 21:46:06 +0000
From: Song Bao Hua <song.bao.hua@...ilicon.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Will Deacon <will@...nel.org>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Paul E . McKenney" <paulmck@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Luis Claudio R. Goncalves" <lgoncalv@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
Dan Streetman <ddstreet@...e.org>,
Vitaly Wool <vitaly.wool@...sulko.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data
> From: "Luis Claudio R. Goncalves" <lgoncalv@...hat.com>
> zwap uses per-CPU compression. The per-CPU data pointer is acquired with
> get_cpu_ptr() which implicitly disables preemption. It allocates memory inside the preempt disabled region which conflicts with the PREEMPT_RT semantics.
> Replace the implicit preemption control with an explicit local lock.
> This allows RT kernels to substitute it with a real per CPU lock, which serializes the access but keeps the code section preemptible. On non RT kernels this maps to preempt_disable() as before, i.e. no functional change.
Hi Luis,
In the below patch, in order to use the acomp APIs to leverage the power of hardware compressors. I have moved to mutex:
https://marc.info/?l=linux-crypto-vger&m=158941285830302&w=2
https://marc.info/?l=linux-crypto-vger&m=158941287930311&w=2
so once we get some progress on that one, I guess we don't need a special patch for RT any more.
> [bigeasy: Use local_lock(), additional hunks, patch description]
> Cc: Seth Jennings <sjenning@...hat.com>
> Cc: Dan Streetman <ddstreet@...e.org>
> Cc: Vitaly Wool <vitaly.wool@...sulko.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-mm@...ck.org
> Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@...hat.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> ---
> mm/zswap.c | 23 ++++++++++++++---------
> 1 file changed, 14 insertions(+), 9 deletions(-)
Thanks
Barry
Powered by blists - more mailing lists