From patchwork Fri Nov 17 16:12:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Miculas X-Patchwork-Id: 166247 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp640861vqn; Fri, 17 Nov 2023 08:12:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2+1rfiUv8nsY0h6ODXXzrHz8VuCno86MGy7XITZ77AbWpcM8xaU8fRXijr8sjIUpmvzsk X-Received: by 2002:a17:90a:1913:b0:27d:c499:14f3 with SMTP id 19-20020a17090a191300b0027dc49914f3mr18695870pjg.9.1700237574525; Fri, 17 Nov 2023 08:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700237574; cv=none; d=google.com; s=arc-20160816; b=RIBfGf4Ittk/0mzbLqge5Pmpi5WQbwQfQundoEmEuVvZ9POdFmVYBsjzvpwyJ8jDSn +1fx5tAz5KL9fSlfotVw6WuJeF2xaMKEuCnpURwoNyvoOR9UTlLaxCrzXK9MZIMnRefj NMihEd9b78UP38Pgh0WfXAFxUdMache+nh8sd/tO9uDW9G3qgmJz0nLYD8MRfbFidqWD EX3eEWUOzrmg6WUYa3qbUJ575z32WMVgd0qcu0kLA5dnrj0UN4O0EWFTV5U6r4e27feZ 9/0pV8zR4ZT81Iy/46pDT2wkSAvWaEqPZGe7VlAvy707RJo62E4Wf0QtYohNx1In4it6 CRnQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GgXVngVtqn/3eXcWTNeMWV+YGgc4Vt86YNtSD3QgKaU=; fh=keEatAjqJ8JDfwyuW+GepWNF7G22gfkxxvvY1oYJ80k=; b=OF+zBmqz7LbL1Xxv3qSzpIcKaHJLvqRaNLWrpG4qH+RpVMtXu5i9kLGQjSKTWL3zgd 20fEh0OasG7hlZ4rvcO7duuKLBMNULwR5WVDowQiCkDOVIrf77iKC7coi4desrV9Zrkb tzjrTLS6ruV8CNfB0rQOYfShVjPk5QydZiQN4OTFaFyMwDgXagyn/giCSdoE2napbkAN 7oYJBw0YWALEpx7VZbz+HhikOzmU7Pha3fBYYS0UMLyNADYvJuQG0pmKm9pnJmVpOV3k jUPuriaUZZvsuAP9259zKQq3/qeiz1P6MOyTHJt2ap74kZnkyU6UVn16xWeuriICObbO JqAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="SwYNuwk/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cisco.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p24-20020a63e658000000b005b90b310e26si2146759pgj.403.2023.11.17.08.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 08:12:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b="SwYNuwk/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=cisco.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CD45181B5D05; Fri, 17 Nov 2023 08:12:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231708AbjKQQMh (ORCPT + 30 others); Fri, 17 Nov 2023 11:12:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231562AbjKQQMg (ORCPT ); Fri, 17 Nov 2023 11:12:36 -0500 Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF12111D; Fri, 17 Nov 2023 08:12:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5097; q=dns/txt; s=iport; t=1700237552; x=1701447152; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/NH0YWL5gm8V0phm/O3rkb1/g0nTScLJ9wh4qMptA9M=; b=SwYNuwk/05wy3c3g8hVSq3woYVX6p7PeM/Yfryd1m+6u+3cjONH/2M3p I2hXrIWUr/0ml6pWnkQIZPM+YTjux7fX1ODYu/MyygQlseDejJ4FUmZxH MBfJj9yMmdLhnwRRYhF0URWmMsA4LQ4p7Su8+Wbb5dvK4mCER7lXCVs9e 4=; X-CSE-ConnectionGUID: VPnjM9NWQdGesiVwHAeUUg== X-CSE-MsgGUID: MxUbRDLGRvmROIrSK6C1JA== X-IronPort-AV: E=Sophos;i="6.04,206,1695686400"; d="scan'208";a="9619884" Received: from aer-iport-nat.cisco.com (HELO aer-core-9.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 16:12:29 +0000 Received: from localhost (dhcp-10-61-101-82.cisco.com [10.61.101.82]) (authenticated bits=0) by aer-core-9.cisco.com (8.15.2/8.15.2) with ESMTPSA id 3AHGCSUJ047870 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Nov 2023 16:12:28 GMT From: Ariel Miculas To: linux-doc@vger.kernel.org Cc: serge@hallyn.com, Ariel Miculas , Phillip Lougher , Jonathan Corbet , linux-kernel@vger.kernel.org Subject: [PATCH v3] docs: filesystems: document the squashfs specific mount options Date: Fri, 17 Nov 2023 18:12:14 +0200 Message-ID: <20231117161215.140282-1-amiculas@cisco.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 X-Authenticated-User: amiculas@cisco.com X-Outbound-SMTP-Client: 10.61.101.82, dhcp-10-61-101-82.cisco.com X-Outbound-Node: aer-core-9.cisco.com X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 17 Nov 2023 08:12:52 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782828314744714442 X-GMAIL-MSGID: 1782828314744714442 When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set, the "threads" mount option can be used to specify the decompression mode: single-threaded, multi-threaded, percpu or the number of threads used for decompression. When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set, SQUASHFS_DECOMP_MULTI and SQUASHFS_MOUNT_DECOMP_THREADS are both set, the "threads" option can also be used to specify the number of threads used for decompression. This mount 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 Reviewed-by: Bagas Sanjaya Reviewed-by: Phillip Lougher --- V2 -> V3: When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set, the "threads" mount option also requires SQUASHFS_MOUNT_DECOMP_THREADS to be set, in addition to SQUASHFS_DECOMP_MULTI V1 -> V2: When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set, the "threads" mount option also requires SQUASHFS_DECOMP_MULTI to be set Documentation/filesystems/squashfs.rst | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/filesystems/squashfs.rst b/Documentation/filesystems/squashfs.rst index df42106bae71..4af8d6207509 100644 --- a/Documentation/filesystems/squashfs.rst +++ b/Documentation/filesystems/squashfs.rst @@ -64,6 +64,66 @@ 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 and + SQUASHFS_DECOMP_MULTI, SQUASHFS_MOUNT_DECOMP_THREADS are + both set: + + ========== ============================================= + 2|3|... configure the number of threads used for + decompression + + The upper limit is num_online_cpus() * 2. + ========== ============================================= + +=================== ========================================================= + 3. Squashfs Filesystem Design -----------------------------