RE: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-20 Thread Song Bao Hua
> Subject: Re: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data > > On 2020-05-20 11:13:31 [+], Song Bao Hua wrote: > > For example, on cpu1, once you begin to compress, you hold the percpu > acomp-ctx and percpu destination buffer of CPU1, the below code ma

Re: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-20 Thread Sebastian Andrzej Siewior
On 2020-05-20 11:13:31 [+], Song Bao Hua wrote: > For example, on cpu1, once you begin to compress, you hold the percpu > acomp-ctx and percpu destination buffer of CPU1, the below code makes sure > you get the acomp and dstmem from the same core by disabling preemption with > get_cpu_var

RE: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-20 Thread Song Bao Hua
> On 2020-05-19 21:46:06 [+], Song Bao Hua wrote: > > 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=158941285830302=2 > >

Re: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-20 Thread Sebastian Andrzej Siewior
On 2020-05-19 21:46:06 [+], Song Bao Hua wrote: > 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=158941285830302=2 >

RE: [PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-19 Thread Song Bao Hua
> From: "Luis Claudio R. Goncalves" > 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

[PATCH 8/8] mm/zswap: Use local lock to protect per-CPU data

2020-05-19 Thread Sebastian Andrzej Siewior
From: "Luis Claudio R. Goncalves" 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