mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoming Ni <nixiaoming@huawei.com>
To: Phillip Lougher <phillip@squashfs.org.uk>,
	<linux-kernel@vger.kernel.org>
Cc: <wangle6@huawei.com>, <yi.zhang@huawei.com>,
	<wangbing6@huawei.com>, <zhongjubin@huawei.com>,
	<chenjianguo3@huawei.com>
Subject: Re: [PATCH v4 1/2] squashfs: add the mount parameter theads=<single|multi|percpu>
Date: Wed, 28 Sep 2022 11:06:49 +0800	[thread overview]
Message-ID: <336305b4-439c-edac-a21e-56e2604de127@huawei.com> (raw)
In-Reply-To: <b3018490-b951-01f0-2b86-84049d9470a0@squashfs.org.uk>

On 2022/9/28 10:20, Phillip Lougher wrote:
> On 16/09/2022 09:36, Xiaoming Ni wrote:
>> Squashfs supports three decompression concurrency modes:
>>     Single-thread mode: concurrent reads are blocked and the memory
>>         overhead is small.
>>     Multi-thread mode/percpu mode: reduces concurrent read blocking but
>>         increases memory overhead.
>>
>> The corresponding schema must be fixed at compile time. During mounting,
>> the concurrent decompression mode cannot be adjusted based on file read
>> blocking.
>>
>> The mount parameter theads=<single|multi|percpu> is added to select
>> the concurrent decompression mode of a single SquashFS file system
>> image.
>>
>> Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
>> +#ifdef CONFIG_SQUASHFS_DECOMP_SINGLE
>> +    opts->thread_ops = &squashfs_decompressor_single;
>> +#elif CONFIG_SQUASHFS_DECOMP_MULTI
>> +    opts->thread_ops = &squashfs_decompressor_multi;
>> +#elif CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU
> 
> In my previous review I asked you to fix the above two #elif
> lines.  You have done so in this patch series, but, only in the
> second patch which seems perverse.
> 
> The reason why this isn't a good approach.  If you *only* apply this 
> patch, with the following Squashfs configuration options
> 
I'm so sorry.
I made a low-level mistake in patching.
I will re-check the previous review comments and resend the patch.

Thanks



> phillip@phoenix:/external/stripe/linux$ grep SQUASHFS .config
> CONFIG_SQUASHFS=y
> # CONFIG_SQUASHFS_FILE_CACHE is not set
> CONFIG_SQUASHFS_FILE_DIRECT=y
> CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
> # CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
> # CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
> # CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
> CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU=y
> CONFIG_SQUASHFS_XATTR=y
> CONFIG_SQUASHFS_ZLIB=y
> CONFIG_SQUASHFS_LZ4=y
> CONFIG_SQUASHFS_LZO=y
> CONFIG_SQUASHFS_XZ=y
> CONFIG_SQUASHFS_ZSTD=y
> # CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
> # CONFIG_SQUASHFS_EMBEDDED is not set
> CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
> 
> 
> You will get the following build warning
> 
> phillip@phoenix:/external/stripe/linux$ make bzImage
>    SYNC    include/config/auto.conf.cmd
>    CALL    scripts/checksyscalls.sh
>    CALL    scripts/atomic/check-atomics.sh
>    DESCEND objtool
>    CHK     include/generated/compile.h
>    UPD     kernel/config_data
>    GZIP    kernel/config_data.gz
>    CC      kernel/configs.o
>    AR      kernel/built-in.a
>    CC      fs/squashfs/block.o
>    CC      fs/squashfs/cache.o
>    CC      fs/squashfs/dir.o
>    CC      fs/squashfs/export.o
>    CC      fs/squashfs/file.o
>    CC      fs/squashfs/fragment.o
>    CC      fs/squashfs/id.o
>    CC      fs/squashfs/inode.o
>    CC      fs/squashfs/namei.o
>    CC      fs/squashfs/super.o
> fs/squashfs/super.c: In function ‘squashfs_init_fs_context’:
> fs/squashfs/super.c:492:7: warning: "CONFIG_SQUASHFS_DECOMP_MULTI" is 
> not defined, evaluates to 0 [-Wundef]
>    492 | #elif CONFIG_SQUASHFS_DECOMP_MULTI
>        |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> This strictly breaks the git bisectability rule.  Every patch should
> be compilable and not break the build or produce warnings.  If not
> it makes git bisect difficult to use to find regressions.
> 
> This can be avoided by fixing the issue in *this* patch.  So
> please do so.
> 
> Thanks
> 
> Phillip
> 
>> +    opts->thread_ops = &squashfs_decompressor_percpu;
>> +#endif
>>       fc->fs_private = opts;
>>       fc->ops = &squashfs_context_ops;
>>       return 0;
>> @@ -478,7 +526,7 @@ static void squashfs_put_super(struct super_block 
>> *sb)
>>           squashfs_cache_delete(sbi->block_cache);
>>           squashfs_cache_delete(sbi->fragment_cache);
>>           squashfs_cache_delete(sbi->read_page);
>> -        squashfs_decompressor_destroy(sbi);
>> +        sbi->thread_ops->destroy(sbi);
>>           kfree(sbi->id_table);
>>           kfree(sbi->fragment_index);
>>           kfree(sbi->meta_index);
> 
> 
> .


  reply	other threads:[~2022-09-28  3:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  3:10 [PATCH 0/2] squashfs: Add the mount parameter "threads=" Xiaoming Ni
2022-08-15  3:10 ` [PATCH 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-08-15 11:19   ` kernel test robot
2022-08-15  3:11 ` [PATCH 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-08-16  1:00 ` [PATCH v2 0/2] squashfs: Add the mount parameter "threads=" Xiaoming Ni
2022-08-16  1:00   ` [PATCH v2 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-08-16  1:00   ` [PATCH v2 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-08-26  6:19   ` ping //Re: [PATCH v2 0/2] squashfs: Add the mount parameter "threads=" Xiaoming Ni
2022-08-28 23:18     ` Phillip Lougher
2022-08-30 13:38       ` Xiaoming Ni
2022-08-30 18:08         ` Phillip Lougher
2022-08-30 18:34           ` Phillip Lougher
2022-08-31  1:09             ` Xiaoming Ni
2022-09-02  9:48   ` [PATCH v3 " Xiaoming Ni
2022-09-02  9:48     ` [PATCH v3 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-09-09 15:44       ` Phillip Lougher
2022-09-13  2:46         ` Xiaoming Ni
2022-09-09 15:50       ` Phillip Lougher
2022-09-13  2:47         ` Xiaoming Ni
2022-09-02  9:48     ` [PATCH v3 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-09-09 15:26     ` [PATCH v3 0/2] squashfs: Add the mount parameter "threads=" Phillip Lougher
2022-09-16  8:36     ` [PATCH v4 " Xiaoming Ni
2022-09-16  8:36       ` [PATCH v4 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-09-28  2:20         ` Phillip Lougher
2022-09-28  3:06           ` Xiaoming Ni [this message]
2022-09-16  8:36       ` [PATCH v4 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-09-27  1:05       ` ping //Re: [PATCH v4 0/2] squashfs: Add the mount parameter "threads=" Xiaoming Ni
2022-09-30  9:14       ` [PATCH v5 " Xiaoming Ni
2022-09-30  9:14         ` [PATCH v5 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-10-17 21:58           ` Re " Phillip Lougher
2022-09-30  9:14         ` [PATCH v5 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-10-17  0:57         ` ping// Re: [PATCH v5 0/2] squashfs: Add the mount parameter "threads=" Xiaoming Ni
2022-10-17 22:59           ` Phillip Lougher
2022-10-18  6:24             ` Xiaoming Ni
2022-10-19  3:09         ` [PATCH v6 " Xiaoming Ni
2022-10-19  3:09           ` [PATCH v6 1/2] squashfs: add the mount parameter theads=<single|multi|percpu> Xiaoming Ni
2022-10-19  3:09           ` [PATCH v6 2/2] squashfs: Allows users to configure the number of decompression threads Xiaoming Ni
2022-10-27 22:44           ` [PATCH v6 0/2] squashfs: Add the mount parameter "threads=" Phillip Lougher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=336305b4-439c-edac-a21e-56e2604de127@huawei.com \
    --to=nixiaoming@huawei.com \
    --cc=chenjianguo3@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.uk \
    --cc=wangbing6@huawei.com \
    --cc=wangle6@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhongjubin@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®