Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1731362rwe; Fri, 2 Sep 2022 02:54:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5aAxpkCkomZUTonF0cBDw+Hg1/xuB9TcPksksnx9nDwT4zIk25yu3BHGEwttzA+GEC+3hr X-Received: by 2002:a17:90b:507:b0:1fd:9b50:d5de with SMTP id r7-20020a17090b050700b001fd9b50d5demr3876013pjz.178.1662112492357; Fri, 02 Sep 2022 02:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662112492; cv=none; d=google.com; s=arc-20160816; b=0mDlW3bKDDGGI7E8G2tAr248Ywn1nbbbazemnSyMlAHDj2wgHdkDfnofo3H6nhgQdN 85btCQkrXWpNg/TZrSIBBHwJregzcOAsYt9lZpq6Qu8ziOiEgEbU6qbJ+p2T2YqLKTxL wpqXtsRTUOnHY6FQugbNVd5VPzE19yre2CQG6yvAKvYo3L7Jwuil/PzZQnN+sMJQbRB7 14LxFTmYWzp5rfDTHTaqQpZYZb/m8fJp3ssndLoWvwBt88ihhtR1a2XxN1oZsTg6Wmrm 97BagEGS1+n4tY82JXzLCM/yepZCvHJtZXSSmK9l3IBJgzsmLtF37ufyPAv25tdIB9TB RX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DNebselv9iD1K9q5YCya8laHHU1R9rA5TAxOlB+hGWg=; b=d6omb1nkKjrv1yrDWdXmN8AYJ7puowma6xn9dwcpXFPwxT9sLH+in88i2SzfHhhix/ oNXtxydGd/p8X0BJDR7fykqAiVEdOK8pzEN0eWt/Q8R0dzndEJzg1l3wUK9Nk6MFArgu x1AQ0Iham1x6+CdfADJEzQhi+xrQidYVjVaA/1uHtymN1aEI6yMqVRFS/g9w+DVcbjb1 9X4Djq7fgWVZ5Vuk/Og8RyQ0gUnP7xs+AokVkYOqpqwajL8S0ekYx8I8lCf+lG/LkY41 GKh8alTi9XcIm+gJWAqRQgixuUjq+ovw6qJBtueNIdEyTtUc9qklGKMdEMpVE/K6vGoy S5ZQ== 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 g67-20020a636b46000000b0042b40184510si1515468pgc.707.2022.09.02.02.54.39; Fri, 02 Sep 2022 02:54:52 -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 S235705AbiIBJtG (ORCPT + 99 others); Fri, 2 Sep 2022 05:49:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235256AbiIBJtE (ORCPT ); Fri, 2 Sep 2022 05:49:04 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF2ACE495 for ; Fri, 2 Sep 2022 02:49:01 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MJtLj5SRYzkX1q; Fri, 2 Sep 2022 17:45:17 +0800 (CST) Received: from use12-sp2.huawei.com (10.67.189.174) 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.24; Fri, 2 Sep 2022 17:48:59 +0800 From: Xiaoming Ni To: , CC: , , , , , Subject: [PATCH v3 0/2] squashfs: Add the mount parameter "threads=" Date: Fri, 2 Sep 2022 17:48:53 +0800 Message-ID: <20220902094855.22666-1-nixiaoming@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220816010052.15764-1-nixiaoming@huawei.com> References: <20220816010052.15764-1-nixiaoming@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.189.174] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 Currently, Squashfs supports multiple decompressor parallel modes. However, this mode can be configured only during kernel building and does not support flexible selection during runtime. In the current patch set, the mount parameter "threads=" is added to allow users to select the parallel decompressor mode and configure the number of decompressors when mounting a file system. "threads=" The upper limit is num_online_cpus() * 2. v3: Based on Philip Lougher's suggestion, make the following updates: 1. The default configuration is the same as that before the patch installation. 2. Compile the three decompression modes when the new configuration is enabled. 3. "threads=1" supports only the SQUASHFS_DECOMP_SINGLE mode. v2: https://lore.kernel.org/lkml/20220816010052.15764-1-nixiaoming@huawei.com/ fix warning: sparse: incorrect type in initializer (different address spaces) Reported-by: kernel test robot v1: https://lore.kernel.org/lkml/20220815031100.75243-1-nixiaoming@huawei.com/ Xiaoming Ni (2): squashfs: add the mount parameter theads= squashfs: Allows users to configure the number of decompression threads. fs/squashfs/Kconfig | 51 ++++++++++++++++-- fs/squashfs/decompressor_multi.c | 32 +++++++----- fs/squashfs/decompressor_multi_percpu.c | 39 ++++++++------ fs/squashfs/decompressor_single.c | 23 +++++--- fs/squashfs/squashfs.h | 43 +++++++++++++-- fs/squashfs/squashfs_fs_sb.h | 4 +- fs/squashfs/super.c | 93 ++++++++++++++++++++++++++++++++- 7 files changed, 237 insertions(+), 48 deletions(-) -- 2.12.3