2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 09:13:55 +08:00
linux-next/drivers/block
zhouxianrong 8e19d540d1 zram: extend zero pages to same element pages
The idea is that without doing more calculations we extend zero pages to
same element pages for zram.  zero page is special case of same element
page with zero element.

1. the test is done under android 7.0
2. startup too many applications circularly
3. sample the zero pages, same pages (none-zero element)
   and total pages in function page_zero_filled

the result is listed as below:

ZERO	SAME	TOTAL
36214	17842	598196

		ZERO/TOTAL	 SAME/TOTAL	  (ZERO+SAME)/TOTAL ZERO/SAME
AVERAGE	0.060631909	 0.024990816  0.085622726		2.663825038
STDEV	0.00674612	 0.005887625  0.009707034		2.115881328
MAX		0.069698422	 0.030046087  0.094975336		7.56043956
MIN		0.03959586	 0.007332205  0.056055193		1.928985507

from the above data, the benefit is about 2.5% and up to 3% of total
swapout pages.

The defect of the patch is that when we recovery a page from non-zero
element the operations are low efficient for partial read.

This patch extends zero_page to same_page so if there is any user to
have monitored zero_pages, he will be surprised if the number is
increased but it's not harmful, I believe.

[minchan@kernel.org: do not free same element pages in zram_meta_free]
  Link: http://lkml.kernel.org/r/20170207065741.GA2567@bbox
Link: http://lkml.kernel.org/r/1483692145-75357-1-git-send-email-zhouxianrong@huawei.com
Link: http://lkml.kernel.org/r/1486307804-27903-1-git-send-email-minchan@kernel.org
Signed-off-by: zhouxianrong <zhouxianrong@huawei.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-24 17:46:56 -08:00
..
aoe block: Use pointer to backing_dev_info from request_queue 2017-02-02 08:20:48 -07:00
drbd for-4.11/linus-merge-signed 2017-02-21 10:57:33 -08:00
mtip32xx block: mtip32xx: set error code on failure 2016-12-01 08:01:14 -07:00
paride Merge branch 'for-4.11/next' into for-4.11/linus-merge 2017-02-17 14:08:19 -07:00
rsxx block: convert to device_add_disk() 2016-06-27 12:26:08 -07:00
xen-blkback xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
zram zram: extend zero pages to same element pages 2017-02-24 17:46:56 -08:00
amiflop.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ataflop.c Merge branch 'for-3.16/core' of git://git.kernel.dk/linux-block into next 2014-06-02 09:29:34 -07:00
brd.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
cciss_cmd.h
cciss_scsi.c scsi: cciss: replace custom function to hexdump 2016-11-08 17:29:57 -05:00
cciss_scsi.h
cciss.c Merge branch 'for-4.11/next' into for-4.11/linus-merge 2017-02-17 14:08:19 -07:00
cciss.h SCSI misc on 20170220 2017-02-21 11:51:42 -08:00
cryptoloop.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
DAC960.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
DAC960.h
floppy.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
hd.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
Kconfig virtio_blk: make SCSI passthrough support configurable 2017-01-31 10:53:10 -07:00
loop.c block/loop: fix race between I/O and set_status 2017-02-13 09:37:21 -07:00
loop.h block: loop: support DIO & AIO 2015-09-23 11:01:16 -06:00
Makefile drivers:block: cpqarray clean up 2016-03-15 15:59:47 -07:00
mg_disk.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
nbd.c nbd: use an idr to keep track of nbd devices 2017-02-01 16:28:08 -07:00
null_blk.c Merge branch 'for-4.11/next' into for-4.11/linus-merge 2017-02-17 14:08:19 -07:00
osdblk.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
pktcdvd.c block: Use pointer to backing_dev_info from request_queue 2017-02-02 08:20:48 -07:00
ps3disk.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
ps3vram.c block: convert to device_add_disk() 2016-06-27 12:26:08 -07:00
rbd_types.h rbd: support for exclusive-lock feature 2016-08-24 23:49:16 +02:00
rbd.c for-4.11/linus-merge-signed 2017-02-21 10:57:33 -08:00
skd_main.c skd: implement trivial scsi ioctls directly 2017-01-31 10:53:03 -07:00
skd_s1120.h skd: fix formatting in skd_s1120.h 2013-11-08 09:10:30 -07:00
smart1,2.h
sunvdc.c block: convert to device_add_disk() 2016-06-27 12:26:08 -07:00
swim3.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
swim_asm.S
swim.c block: drop owner assignment from platform_drivers 2014-10-20 16:20:18 +02:00
sx8.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
umem.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
umem.h
virtio_blk.c for-4.11/linus-merge-signed 2017-02-21 10:57:33 -08:00
xen-blkfront.c Merge branch 'for-4.11/next' into for-4.11/linus-merge 2017-02-17 14:08:19 -07:00
xsysace.c block: fold cmd_type into the REQ_OP_ space 2017-01-31 14:00:44 -07:00
z2ram.c block: remove struct request buffer member 2014-04-15 14:03:02 -06:00