Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6055264rwn; Mon, 12 Sep 2022 20:17:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vIpjahh9aA9Yvn/99zcRrNecDZjo5sbc+BNKGgUYDPo2RV4UuvcxquwxjTmB3Bdv1zo8c X-Received: by 2002:a17:907:7b94:b0:731:1b11:c241 with SMTP id ne20-20020a1709077b9400b007311b11c241mr21105464ejc.676.1663039030101; Mon, 12 Sep 2022 20:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663039030; cv=none; d=google.com; s=arc-20160816; b=KZVcDs5ENUlbZMMSw63FbXuUPff3nb61zQOdAiyg4DpcgfDtSDTCzWp74dI5KNSScN tMQQcAxUO4YPgMFhrjgo1yxAitb1UbbQsLt8t/hLTYdtICUuJDtNeonq9TasNtIX+DIz HCKxAt/CTFWfyjt4f0vEbXKuifFqztBuccxsiqqw0+zawvNRm4P0bFo3FhD6SDME/4QC bnSo9oVkYaWcM1iIDI9gTHVBsS2rWw1JAc7ZUUspHVt/wFeq4+6Dld7MVga++0OpNEFS 5eI+yHInBbruwOViPLzRIwWQWBRzXgVWZAJpRbPl542sfgg84FXt7j7uRPyAW+xV1rPX 1oYQ== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=Cbej5pL8nMGO559i8PAWKxyiUs+kv4mQY8Wm682jug4=; b=FNEhu+qISXmzpr6p8hsDyVpwG12CO917E6bBm2GMxd8JJrGM7W58yPQo+EjMOAq4r0 maDCe8I9WWzvxjzvvyeHrcXKyQejxve431pr7Xpb14ID9gAf6FlgHeTWGF95mRClgj7b pogeUSfdPJ+PscRRGD7S0uTAXYlXE1fvoyTlm39APzboK5Zj6hpPP4mDUruTnOin/xXo ARqe8Fn6fD7tdfHFwWwnHQ0o3DxkzNgjc4sdmInv0CgKt/WxqmR2hTSSIdUS5AxzH9dP oXjlnjJXg88NGtEz+ZmybbIrg5F3bEOFXJBhmg8vzPW7dR0K7Mr6Swdoa0FHkVCWxZIV HLzg== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a50a408000000b00447abccda64si7814880edb.422.2022.09.12.20.16.45; Mon, 12 Sep 2022 20:17:10 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbiIMCr6 (ORCPT + 99 others); Mon, 12 Sep 2022 22:47:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbiIMCr4 (ORCPT ); Mon, 12 Sep 2022 22:47:56 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924E653012 for ; Mon, 12 Sep 2022 19:47:54 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MRSWg4ZNgzHnvC; Tue, 13 Sep 2022 10:45:51 +0800 (CST) Received: from [10.67.110.83] (10.67.110.83) by canpemm500006.china.huawei.com (7.192.105.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 13 Sep 2022 10:47:52 +0800 Subject: Re: [PATCH v3 1/2] squashfs: add the mount parameter theads= To: Phillip Lougher , CC: , , , , References: <20220816010052.15764-1-nixiaoming@huawei.com> <20220902094855.22666-1-nixiaoming@huawei.com> <20220902094855.22666-2-nixiaoming@huawei.com> <46301691-6196-ca3b-7a20-099d7b87c2ec@squashfs.org.uk> From: Xiaoming Ni Message-ID: <2a9e294d-ffcc-906c-12e9-013e87ef7c4d@huawei.com> Date: Tue, 13 Sep 2022 10:47:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: <46301691-6196-ca3b-7a20-099d7b87c2ec@squashfs.org.uk> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.83] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,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 2022/9/9 23:50, Phillip Lougher wrote: > 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 > Thanks for your comment, I'll fix it in the next patch version >> +    opts->thread_ops = &squashfs_decompressor_multi; >> +#elif CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU > > this should be > > #elif defined CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU > Thanks for your comment, I'll fix it in the next patch version > Phillip > >> +    opts->thread_ops = &squashfs_decompressor_percpu; >> +#endif >>       fc->fs_private = opts; >>       fc->ops = &squashfs_context_ops; >>       return 0; > > > . Thanks Xiaoming Ni