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:   Tue, 9 Nov 2021 11:16:47 +0800
From:   Gao Xiang <hsiangkao@...ux.alibaba.com>
To:     Huang Jianan <huangjianan@...o.com>
Cc:     linux-erofs@...ts.ozlabs.org, zhangshiming@...o.com,
        linux-kernel@...r.kernel.org, yh@...o.com, guanyuwei@...o.com,
        guoweichao@...o.com
Subject: Re: [PATCH 2/2] erofs: add sysfs node to control sync decompression
 strategy

On Tue, Nov 09, 2021 at 10:54:45AM +0800, Huang Jianan via Linux-erofs wrote:
> Although readpage is a synchronous path, there will be no additional
> kworker scheduling overhead in non-atomic contexts. So we can add a
> sysfs node to allow disable sync decompression.
> 
> Signed-off-by: Huang Jianan <huangjianan@...o.com>
> ---
>  fs/erofs/internal.h | 2 +-
>  fs/erofs/super.c    | 2 +-
>  fs/erofs/sysfs.c    | 6 ++++++
>  fs/erofs/zdata.c    | 9 ++++-----
>  4 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index d0cd712dc222..1ab96878009d 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -60,7 +60,7 @@ struct erofs_mount_opts {
>  #ifdef CONFIG_EROFS_FS_ZIP
>  	/* current strategy of how to use managed cache */
>  	unsigned char cache_strategy;
> -	/* strategy of sync decompression (false - auto, true - force on) */
> +	/* strategy of sync decompression (false - disable, true - force on) */

Please leave false - auto.

>  	bool readahead_sync_decompress;
>  
>  	/* threshold for decompression synchronously */
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index abc1da5d1719..26585d865503 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -423,7 +423,7 @@ static void erofs_default_options(struct erofs_fs_context *ctx)
>  #ifdef CONFIG_EROFS_FS_ZIP
>  	ctx->opt.cache_strategy = EROFS_ZIP_CACHE_READAROUND;
>  	ctx->opt.max_sync_decompress_pages = 3;
> -	ctx->opt.readahead_sync_decompress = false;
> +	ctx->opt.readahead_sync_decompress = true;

Please leave readahead_sync_decompress = false 'auto' by default.

I don't like .readpage() applies async decompression since it's
actually a sync way, otherwise, it will cause more scheduling
overhead, see:
https://lore.kernel.org/r/20201016160443.18685-1-willy@infradead.org
https://lore.kernel.org/r/20201102184312.25926-16-willy@infradead.org

Thanks,
Gao Xiang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ