summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zsmalloc/zsmalloc-main.c
diff options
context:
space:
mode:
authorMinchan Kim2012-06-08 08:39:27 +0200
committerGreg Kroah-Hartman2012-06-11 18:00:01 +0200
commit130f315a174d127cbb90d4d1a4a7088dbcf930b5 (patch)
treea7eb4d0c96be2773b57283b5230483474410d7e5 /drivers/staging/zsmalloc/zsmalloc-main.c
parentstaging: zram: fix random data read (diff)
downloadkernel-qcow2-linux-130f315a174d127cbb90d4d1a4a7088dbcf930b5.tar.gz
kernel-qcow2-linux-130f315a174d127cbb90d4d1a4a7088dbcf930b5.tar.xz
kernel-qcow2-linux-130f315a174d127cbb90d4d1a4a7088dbcf930b5.zip
staging: zram: remove special handle of uncompressed page
xvmalloc can't handle PAGE_SIZE page so that zram have to handle it specially but zsmalloc can do it so let's remove unnecessary special handling code. Quote from Nitin "I think page vs handle distinction was added since xvmalloc could not handle full page allocation. Now that zsmalloc allows full page allocation, we can just use it for both cases. This would also allow removing the ZRAM_UNCOMPRESSED flag. The only downside will be slightly slower code path for full page allocation but this event is anyways supposed to be rare, so should be fine." 1. This patch reduces code very much. drivers/staging/zram/zram_drv.c | 104 +++++-------------------------------- drivers/staging/zram/zram_drv.h | 17 +----- drivers/staging/zram/zram_sysfs.c | 6 +-- 3 files changed, 15 insertions(+), 112 deletions(-) 2. change pages_expand with bad_compress so it can count bad compression(above 75%) ratio. 3. remove zobj_header which is for back-reference for defragmentation because firstly, it's not used at the moment and zsmalloc can't handle bigger size than PAGE_SIZE so zram can't do it any more without redesign. Cc: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Minchan Kim <minchan@kernel.org> Acked-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zsmalloc/zsmalloc-main.c')
0 files changed, 0 insertions, 0 deletions