lkml.org 
[lkml]   [2016]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] drivers/zram: Don't disable preemption in zcomp_stream_get/put()
From
Date

In v4.7, the driver switched to percpu compression streams, disabling
preemption (get/put_cpu_ptr()). Use get/put_cpu_light() instead.

Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
---
drivers/block/zram/zcomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -118,12 +118,12 @@ ssize_t zcomp_available_show(const char

struct zcomp_strm *zcomp_stream_get(struct zcomp *comp)
{
- return *get_cpu_ptr(comp->stream);
+ return *per_cpu_ptr(comp->stream, get_cpu_light());
}

void zcomp_stream_put(struct zcomp *comp)
{
- put_cpu_ptr(comp->stream);
+ put_cpu_light();
}

int zcomp_compress(struct zcomp_strm *zstrm,
\
 
 \ /
  Last update: 2016-10-16 05:14    [W:0.176 / U:2.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site