Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2165321rwn; Fri, 9 Sep 2022 09:22:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6aQDJEAwUtx7CgJQisFlgfSEbjLSoRjJ1S2oET+EYzm8om8G0u5Zqkyo7Ho/nHc20Sb03z X-Received: by 2002:a05:6a00:22c3:b0:540:f546:eea9 with SMTP id f3-20020a056a0022c300b00540f546eea9mr2420291pfj.80.1662740551580; Fri, 09 Sep 2022 09:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662740551; cv=none; d=google.com; s=arc-20160816; b=Y5+nKVSeX14xBcAMpkrAeKSEnx4viiAZCQ1FX5QXBQZOTA5roVXWvyz4fdkZ5rq9eP 9UGX9snvFhO2hI7Rwlg9ZawQVHcDsye9Tr/9p4Wn+Xvrn7vpxLErRuV8Wm1hokKzxJ3D 52SYt/6V3z+JMKUnJvge0Qe4JJGdbDiRhE0kB7msZQ6J7m8PmBU7yXGzMzEw/F41IPnv WF6eWiAzT58+5xO/aErLjTOtUrBwK+THEBhkI4S+PMRS5Dx4gynEG0GudyAD0jzPgZ1l RKvCLLWUIu5PVi7m5PYlaj6KApJ0ICN0Hozz2m+ZeAkGeiElLsJfdwApKlBJLWcAHfRP 1wow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=hdUr3ePmeGBqkrODJIrofiGuVFOSZc84WXtIb5ZZQDo=; b=aUwc5eWv6md66OPQ2UgWWHStX1oRcOwaHwyADsR9GXx/cp91DxLoTK7gOGjy8QmE9p e/AjcjVfvWO8WQsdGY0JxS+LV+zYPgWaRo+i+flU+pvKLP4epI2ZxsDjpKVcmoJ4JMOc aXqirSir38L2Fr5E7rl4ZI6q+dd2Ly6dBiJT9OY7ZmLJTS6bCMUA+NAMmETTc9nbpMyA m9O8aGIRRdkTJ8Uce3I8cY1nUDmEbWZ9oFMBD5UqWeb8GNdWMdZ9TJRCGPvmvM4lFFH0 h5avpOErIfk3cz9ByvDZwsNmzdMN/WAUiQMpe6e89YWOnBWSoVF24b5+uhmrO2s9/JUt QClA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i124-20020a625482000000b005257035371bsi872408pfb.108.2022.09.09.09.22.19; Fri, 09 Sep 2022 09:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbiIIPuT (ORCPT + 99 others); Fri, 9 Sep 2022 11:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiIIPuS (ORCPT ); Fri, 9 Sep 2022 11:50:18 -0400 Received: from p3plwbeout22-02.prod.phx3.secureserver.net (p3plsmtp22-02-2.prod.phx3.secureserver.net [68.178.252.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BCC5F7ED for ; Fri, 9 Sep 2022 08:50:17 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.143]) by :WBEOUT: with ESMTP id WgGjobKzWimR6WgGkodAum; Fri, 09 Sep 2022 08:50:14 -0700 X-CMAE-Analysis: v=2.4 cv=U/ZXscnu c=1 sm=1 tr=0 ts=631b60b8 a=EhJYbXVJKsomWlz4CTV+qA==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=IkcTkHD0fZMA:10 a=xOM3xZuef0cA:10 a=i0EeH86SAAAA:8 a=zk3y8DHZygHQSc2CZO8A:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: WgGjobKzWimR6 Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=[192.168.178.33]) by smtp13.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1oWgGj-0006By-8N; Fri, 09 Sep 2022 16:50:13 +0100 Message-ID: <46301691-6196-ca3b-7a20-099d7b87c2ec@squashfs.org.uk> Date: Fri, 9 Sep 2022 16:50:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH v3 1/2] squashfs: add the mount parameter theads= To: Xiaoming Ni , linux-kernel@vger.kernel.org Cc: wangle6@huawei.com, yi.zhang@huawei.com, wangbing6@huawei.com, zhongjubin@huawei.com, chenjianguo3@huawei.com References: <20220816010052.15764-1-nixiaoming@huawei.com> <20220902094855.22666-1-nixiaoming@huawei.com> <20220902094855.22666-2-nixiaoming@huawei.com> From: Phillip Lougher In-Reply-To: <20220902094855.22666-2-nixiaoming@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailcore-Auth: 439999529 X-Mailcore-Domain: 1394945 X-123-reg-Authenticated: phillip@squashfs.org.uk X-Originating-IP: 82.69.79.175 X-CMAE-Envelope: MS4xfGLM3x0WOFt7xmsMp5kIeAcrsgrUKYM0sprjQIUWNUvvOBVoy6T81dqx+WtrSCbEi/36lH3XPlVJx61/0remlrQsYxPTc8t47TzbUfxowZDvOwQXdkFF FyWALWOYqcjNO2S62LEi6ZgBnBSAVDz0Q3CjRcVY0OwJf8CVqdAMp5uNHs0oRCSBD2jKT/3fNYcFyjnRRfL+0hlNYssPYnP+UNo= X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/09/2022 10:48, 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= is added to select > the concurrent decompression mode of a single SquashFS file system > image. > > Signed-off-by: Xiaoming Ni Additional review comment ... [SNIP] > diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c > index 32565dafa7f3..fd4e70d45f3c 100644 > --- a/fs/squashfs/super.c > +++ b/fs/squashfs/super.c > @@ -47,10 +47,12 @@ enum Opt_errors { [SNIP] > +#ifdef CONFIG_SQUASHFS_DECOMP_SINGLE > + opts->thread_ops = &squashfs_decompressor_single; > +#elif CONFIG_SQUASHFS_DECOMP_MULTI this should be #elif defined CONFIG_SQUASHFS_DECOMP_MULTI > + opts->thread_ops = &squashfs_decompressor_multi; > +#elif CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU this should be #elif defined CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU Phillip > + opts->thread_ops = &squashfs_decompressor_percpu; > +#endif > fc->fs_private = opts; > fc->ops = &squashfs_context_ops; > return 0;