Skip to content
  • karam.lee's avatar
    zram: implement rw_page operation of zram · 8c7f0102
    karam.lee authored
    
    
    This patch implements rw_page operation for zram block device.
    
    I implemented the feature in zram and tested it.  Test bed was the G2, LG
    electronic mobile device, whtich has msm8974 processor and 2GB memory.
    
    With a memory allocation test program consuming memory, the system
    generates swap.
    
    Operating time of swap_write_page() was measured.
    
    --------------------------------------------------
    |             |   operating time   | improvement |
    |             |  (20 runs average) |             |
    --------------------------------------------------
    |with patch   |    1061.15 us      |    +2.4%    |
    --------------------------------------------------
    |without patch|    1087.35 us      |             |
    --------------------------------------------------
    
    Each test(with paged_io,with BIO) result set shows normal distribution and
    has equal variance.  I mean the two values are valid result to compare.  I
    can say operation with paged I/O(without BIO) is faster 2.4% with
    confidence level 95%.
    
    [minchan@kernel.org: make rw_page opeartion return 0]
    [minchan@kernel.org: rely on the bi_end_io for zram_rw_page fails]
    [sergey.senozhatsky@gmail.com: code cleanup]
    [minchan@kernel.org: add comment]
    Signed-off-by: default avatarkaram.lee <karam.lee@lge.com>
    Acked-by: default avatarMinchan Kim <minchan@kernel.org>
    Acked-by: default avatarJerome Marchand <jmarchan@redhat.com>
    Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
    Cc: Nitin Gupta <ngupta@vflare.org>
    Cc: <seungho1.park@lge.com>
    Signed-off-by: default avatarMinchan Kim <minchan@kernel.org>
    Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    8c7f0102