lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Mar 2017 13:12:38 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Minchan Kim <minchan@...nel.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        kernel-team@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zram: factor out partial IO routine

On (03/29/17 16:48), Minchan Kim wrote:
> For architecture(PAGE_SIZE > 4K), zram have supported partial IO.
> However, the mixed code for handling normal/partial IO is too mess,
> error-prone to modify IO handler functions with upcoming feature
> so this patch aims for cleaning up via factoring out partial IO
> routines to zram_bvec_partial_[read|write] which will be disabled
> for most 4K page architecures.
> 
> x86(4K architecure)
> add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-664 (-664)
> function                                     old     new   delta
> zram_bvec_rw                                2301    2039    -262
> zram_decompress_page.isra                    402       -    -402
> 
> So, we will save 662 bytes.
> 
> However, as side effect, it will increase binary size in
> non-4K architecure but it's not major for zram so I believe
> benefit(maintainance, binary size for most architecture) is bigger.

a bigger side effect is that now we double the amount of lines we need
to change in certain patches and, thus, the amount of work - when we
add new functionality/fix something in zram_bvec_{write, read} we also
would need to touch zram_bvec_partial_{write, read}.

still probably worth it.

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ