]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: erofs: separate into init_once / always
authorGao Xiang <gaoxiang25@huawei.com>
Thu, 22 Nov 2018 17:21:46 +0000 (01:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Nov 2018 09:53:08 +0000 (10:53 +0100)
commit48d4bf3b05a683539a43faa02c6f3091c715c9cc
treec1bd03f7291e9aa6044725dd30b9ac9b315912a4
parent948bbdb1818b7ad6e539dad4fbd2dd4650793ea9
staging: erofs: separate into init_once / always

`z_erofs_vle_workgroup' is heavily generated in the decompression,
for example, it resets 32 bytes redundantly for 64-bit platforms
even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES,
default 4, pages are stored in `z_erofs_vle_workgroup'.

As an another example, `struct mutex' takes 72 bytes for our kirin
64-bit platforms, it's unnecessary to be reseted at first and
be initialized each time.

Let's avoid filling all `z_erofs_vle_workgroup' with 0 at first
since most fields are reinitialized to meaningful values later,
and pagevec is no need to initialized at all.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/unzip_vle.c