Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1884209rwn; Fri, 16 Sep 2022 02:15:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Y2lQnp5wNAequse0JK02YxxwsBvPaWpSdbMBeqWpzVZi0D47bJcACSuzaOznRw0bRzTmf X-Received: by 2002:a17:907:980e:b0:77a:6958:5aa1 with SMTP id ji14-20020a170907980e00b0077a69585aa1mr3038199ejc.232.1663319726578; Fri, 16 Sep 2022 02:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663319726; cv=none; d=google.com; s=arc-20160816; b=wZLnhUBKrAel9ddA7tSAGRxBrci5lF6jvyP1qzO2wswfau417SWrvC0KNNGuLdciYl 67JySgaxyDJ39azjwrN9mc66DLGekqvRBj9r3e8K0GUKCRXJVqnvqYI9VDn4+ArZBvqH ugnV1W+EhLxaANzymwVjUDRyrCuWhVHT7YeBB7uzo0JKgU13OvRhtwhHTPUbFjZQuB5g aZyQqXFX70k0BsNOT/m8n65V5VV5w/fa3UYlC6KWeMT0RhEBXdgiFIn2v2E2nGLmrqmH dZfGgjijOG0cIGNT2PEmTxPHWwfcV/414mGz2csSTtHlvV3LF2ik/oFCKoVBZQGKPgzi B+Hw== 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=+RZkjL3XDNb2bNN+P9TT8Br9HU+QGc2csfpHwhXs7cE=; b=ZGTKfuwCKoegfsB4DaX7AhRmeRPFdjLm5Bmt9MrYxdHMA8Wm6WwEpTup10pt1vOWO2 J/bReCDzSi8w62H3OfZaEjF4xj2en97S7fb5uGcu1Z4miZ0azGhHTD11QZU8CDgUhsp8 RpVaPEAwmLKpWjsfzD0WJdJEZQ6rMoDkxJSrvQXOG/UYcV5qzglHqg8vFzxxcKZn/uGw 2+PJKrd5+bz5VRzKH30bIytQdb98QVpzun7nnLELcsEUIpmFT6IqBmDtM0+XRkSvdJ9r f7YP/w8rzYmu3YTIVzE/E5RwIgvbmTfWu8FFZpi+UEXy2WVZ+1pF4t9ln7c2BpEIfRv5 mlpg== 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 nd16-20020a170907629000b0077087274a48si20808342ejc.257.2022.09.16.02.15.00; Fri, 16 Sep 2022 02:15:26 -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 S230024AbiIPIgO (ORCPT + 99 others); Fri, 16 Sep 2022 04:36:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiIPIgL (ORCPT ); Fri, 16 Sep 2022 04:36:11 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9195BA74E2 for ; Fri, 16 Sep 2022 01:36:09 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MTS3639HBzMmy5; Fri, 16 Sep 2022 16:31:30 +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.31; Fri, 16 Sep 2022 16:36:07 +0800 From: Xiaoming Ni To: , CC: , , , , , Subject: [PATCH v4 0/2] squashfs: Add the mount parameter "threads=" Date: Fri, 16 Sep 2022 16:36:02 +0800 Message-ID: <20220916083604.33408-1-nixiaoming@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220902094855.22666-1-nixiaoming@huawei.com> References: <20220902094855.22666-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: dggems704-chm.china.huawei.com (10.3.19.181) 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 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. v4: Based on Philip Lougher's suggestion, make the following updates: 1. Use static modifiers to avoid changing symbol names. 2. Fixed some formatting issues v3: https://lore.kernel.org/lkml/20220902094855.22666-1-nixiaoming@huawei.com/ 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/block.c | 2 +- fs/squashfs/decompressor.c | 2 +- fs/squashfs/decompressor_multi.c | 20 ++++--- fs/squashfs/decompressor_multi_percpu.c | 23 +++++--- fs/squashfs/decompressor_single.c | 15 +++-- fs/squashfs/squashfs.h | 23 ++++++-- fs/squashfs/squashfs_fs_sb.h | 4 +- fs/squashfs/super.c | 97 ++++++++++++++++++++++++++++++++- 9 files changed, 203 insertions(+), 34 deletions(-) -- 2.12.3