Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2210395rdh; Sun, 29 Oct 2023 05:55:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDKdL3a9sdRRFYf9sa+dap/kuKMrtFSoeVgRpnGQw1UE2ZqeF2euWqATmVkKGhmwy96m5P X-Received: by 2002:a05:6a20:8f1f:b0:15d:1646:285a with SMTP id b31-20020a056a208f1f00b0015d1646285amr9790344pzk.21.1698584128839; Sun, 29 Oct 2023 05:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698584128; cv=none; d=google.com; s=arc-20160816; b=wXh0G72fa1BhQuaqCewkRuxxrI/uKUzqms+bz7gcH++rOx+CUWyIQnG9j3dr+7leKa ARIIDdLd86jEbDk8TRLKCFIBOo3pCiR5mVmSP0V2NuK6NuAWSOuIfqi2aG8An9btZotU V5VAN3Oy6aWvS/oVHULL++uJPG1bwSmsE/XC0JxhVwM4x+TXoMg9+Xh4iM0uZE8SEhqC SnOVQyfEyREvlukhtrsuXtOhniOqjopz5au0wJCloBTi+NAgf2an7SmoNiZHwxO7vK16 ZaJ8fwsdAjj2C0EXY4LVCTucoH2ig0YIEWV0YxQUnQEvf8VfSpAyO0sF3itUK1E/8PKU fpHg== 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=oryQ+XuKwvSMYWF/+ie7xKvzSr+hpyXlLh/ebN2Mi5k=; fh=37NxVIAGAiceqidL/zbzCsijWUy2L5qfQON88DyUf8Q=; b=et9dar7MQX/xgVQfjRkAXvtSFbiCMsnuqZ92dS+dF0dHe132P54mJovs0nk7xzQYdd MY6CV8BnoI6VaCjrEETfiM1+ke12jU33efRkow1VRIBUPRnGJEU1tqcJbEmX8AjKd1N8 W740p/vBOPlCJVQnT6i6nH0GTES4Hj8w3Ao49uFamtnzrkD5aRRjd8KhojjHevkNtU/w ehh5BDYpm6oB95NLswewXjAMqX1yb3YHD6+ncS7hrN+lRfdYW7etYvhEtBoH3P1VGZi2 FBwXAYWKUgu8vf9TZ0qwyt/aQgZ0QHhuXQ/22xuujo+YDyjuJZwhhLonGJWk1SgrqZt/ UZzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h7-20020a056a00000700b006a15afe16adsi3586121pfk.258.2023.10.29.05.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 05:55:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 22870805A929; Sun, 29 Oct 2023 05:55:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbjJ2Myw (ORCPT + 99 others); Sun, 29 Oct 2023 08:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjJ2Myv (ORCPT ); Sun, 29 Oct 2023 08:54:51 -0400 X-Greylist: delayed 165 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 29 Oct 2023 05:54:49 PDT Received: from p3plwbeout27-04.prod.phx3.secureserver.net (p3plsmtp27-04-2.prod.phx3.secureserver.net [216.69.139.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38CA4C0 for ; Sun, 29 Oct 2023 05:54:49 -0700 (PDT) Received: from mailex.mailcore.me ([94.136.40.141]) by :WBEOUT: with ESMTP id x5GsqmsyHEGwpx5GsqUYr1; Sun, 29 Oct 2023 05:52:03 -0700 X-CMAE-Analysis: v=2.4 cv=Z7spoFdA c=1 sm=1 tr=0 ts=653e5573 a=bheWAUFm1xGnSTQFbH9Kqg==:117 a=84ok6UeoqCVsigPHarzEiQ==:17 a=ggZhUymU-5wA:10 a=IkcTkHD0fZMA:10 a=bhdUkHdE2iEA:10 a=AUd_NHdVAAAA:8 a=VwQbUJbxAAAA:8 a=vaoKmyfopMuWMe4x9wgA:9 a=QEXdDO2ut3YA:10 a=AjGcO6oz07-iQ99wixmX:22 X-SECURESERVER-ACCT: phillip@squashfs.org.uk X-SID: x5GsqmsyHEGwp Received: from 82-69-79-175.dsl.in-addr.zen.co.uk ([82.69.79.175] helo=[192.168.178.90]) by smtp07.mailcore.me with esmtpa (Exim 4.94.2) (envelope-from ) id 1qx5Gx-0005xc-L4; Sun, 29 Oct 2023 12:52:08 +0000 Message-ID: <9596fa83-f06c-5582-7f99-c99c67e73dba@squashfs.org.uk> Date: Sun, 29 Oct 2023 12:51:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] docs: filesystems: document the squashfs specific mount options To: Ariel Miculas , linux-doc@vger.kernel.org Cc: serge@hallyn.com, Jonathan Corbet , linux-kernel@vger.kernel.org References: <20231027150814.217689-1-amiculas@cisco.com> From: Phillip Lougher In-Reply-To: <20231027150814.217689-1-amiculas@cisco.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: MS4xfPW1OAFQJkflB7NKjk294hyFcn5+1eoM+/3+3IvNWWAsoaQPRrZEQeeTRJiyNihPIFEE9MncUbbHiy7VyFuccVI+aGpjEpArA4THsJZ5+IZyUxKgp8Ia sTNzNUlqPV5G+3tXkVENxfksUbimQi4kj1vv1FwwSTWee9nlsHOrtDBHE5EfEVN2/D39mgJnkBSIW8LlaGsWakM7DHtZEiayMPXkou/GJBRznWqZxLKxEFMw IqKxsI47FX94qZEgNYZF0Q== X-Spam-Status: No, score=-3.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 29 Oct 2023 05:55:26 -0700 (PDT) On 27/10/2023 16:08, Ariel Miculas wrote: > When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set, the "threads" mount option > can be used to specify the decompression mode: single-threaded, > multi-threaded or percpu. It can also be used to specify the number of > threads used for decompression. > This option is only mentioned in fs/squashfs/Kconfig, which makes it > difficult to find. > > Another mount option available is "errors", which can be configured to > panic the kernel when squashfs errors are encountered. > > Add both these options to the squashfs documentation, making them more > noticeable. > > Signed-off-by: Ariel Miculas --- > Documentation/filesystems/squashfs.rst | 58 ++++++++++++++++++++++++++ > 1 file changed, 58 insertions(+) > > diff --git a/Documentation/filesystems/squashfs.rst b/Documentation/filesystems/squashfs.rst > index df42106bae71..f71ac870603b 100644 > --- a/Documentation/filesystems/squashfs.rst > +++ b/Documentation/filesystems/squashfs.rst > @@ -64,6 +64,64 @@ obtained from this site also. > The squashfs-tools development tree is now located on kernel.org > git://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git > > +2.1 Mount options > +----------------- > +=================== ========================================================= > +errors=%s Specify whether squashfs errors trigger a kernel panic > + or not > + > + ========== ============================================= > + continue errors don't trigger a panic (default) > + panic trigger a panic when errors are encountered, > + similar to several other filesystems (e.g. > + btrfs, ext4, f2fs, GFS2, jfs, ntfs, ubifs) > + > + This allows a kernel dump to be saved, > + useful for analyzing and debugging the > + corruption. > + ========== ============================================= > +threads=%s Select the decompression mode or the number of threads > + > + If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set: > + > + ========== ============================================= > + single use single-threaded decompression (default) > + > + Only one block (data or metadata) can be > + decompressed at any one time. This limits > + CPU and memory usage to a minimum, but it > + also gives poor performance on parallel I/O > + workloads when using multiple CPU machines > + due to waiting on decompressor availability. > + multi use up to two parallel decompressors per core > + > + If you have a parallel I/O workload and your > + system has enough memory, using this option > + may improve overall I/O performance. It > + dynamically allocates decompressors on a > + demand basis. > + percpu use a maximum of one decompressor per core > + > + It uses percpu variables to ensure > + decompression is load-balanced across the > + cores. > + 1|2|3|... configure the number of threads used for > + decompression > + > + The upper limit is num_online_cpus() * 2. > + ========== ============================================= > + > + If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set: In this case it also depends on the SQUASHFS_DECOMP_MULTI decompressor having been selected. In otherwords threads=xxx won't work if the single threaded (SQUASHFS_DECOMP_SINGLE) or percpu threaded (SQUASHFS_DECOMP_MULTI_PERCPU) decompressors have been selected at build time. The reason for this is quite simple, due to their implementation the number of threads they use is fixed and cannot be changed. Changing the line to something like If SQUASHFS_CHOICE_DECOMP_BY_MOUNT is **not** set and SQUASHFS_DECOMP_MULTI is set should be OK here.