diff options
| author | Minchan Kim <minchan@kernel.org> | 2014-01-30 15:46:04 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2016-12-11 12:59:22 +0100 |
| commit | f650d48375be1e844bf05cc6f468226511b0fe2c (patch) | |
| tree | 922ede1830c936a5753093fe90a395c4b402bfb8 /include/linux | |
| parent | b3aef48bf1ce35dde13aad91fa441d996635410a (diff) | |
zram: remove workqueue for freeing removed pending slot
Commit a0c516cbfc74 ("zram: don't grab mutex in zram_slot_free_noity")
introduced free request pending code to avoid scheduling by mutex under
spinlock and it was a mess which made code lenghty and increased
overhead.
Now, we don't need zram->lock any more to free slot so this patch
reverts it and then, tb_lock should protect it.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/zram_drv.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/zram_drv.h b/include/linux/zram_drv.h index c89878172..bdbab8652 100644 --- a/include/linux/zram_drv.h +++ b/include/linux/zram_drv.h @@ -90,20 +90,11 @@ struct zram_meta { struct zs_pool *mem_pool; }; -struct zram_slot_free { - unsigned long index; - struct zram_slot_free *next; -}; - struct zram { struct zram_meta *meta; struct rw_semaphore lock; /* protect compression buffers, * reads and writes */ - - struct work_struct free_work; /* handle pending free request */ - struct zram_slot_free *slot_free_rq; /* list head of free request */ - struct request_queue *queue; struct gendisk *disk; int init_done; @@ -114,7 +105,6 @@ struct zram { * we can store in a disk. */ u64 disksize; /* bytes */ - spinlock_t slot_free_lock; struct zram_stats stats; }; |
