lkml.org 
[lkml]   [2016]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] drivers/zram: Don't disable preemption in zcomp_stream_get/put()
On 2016-10-16 05:14:22 [+0200], Mike Galbraith wrote:
>
> In v4.7, the driver switched to percpu compression streams, disabling
> preemption (get/put_cpu_ptr()). Use get/put_cpu_light() instead.

I am not convinced that this will work. Nothing prevents
zram_bvec_write() to be reentrant on the same CPU what I can tell from
browsing over the code and since it uses zstrm->buffer for compression
it can go wrong. Also I don't know if crypto's tfm handler can be used
in parallel for any ops (it usually does not work for crypto).

I suggest a local lock or a good reason why the this patch works.

Sebastian

\
 
 \ /
  Last update: 2016-10-17 16:24    [W:0.125 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site