From patchwork Sun Oct 27 17:36:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ma=C3=ADra_Canal?= X-Patchwork-Id: 13852707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C2F6D13572 for ; Sun, 27 Oct 2024 17:58:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 770DD6B009C; Sun, 27 Oct 2024 13:58:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CFA56B009D; Sun, 27 Oct 2024 13:58:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 524C76B009E; Sun, 27 Oct 2024 13:58:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1E1396B009C for ; Sun, 27 Oct 2024 13:58:46 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id BF24A141BC2 for ; Sun, 27 Oct 2024 17:58:22 +0000 (UTC) X-FDA: 82720141518.03.170F88A Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf26.hostedemail.com (Postfix) with ESMTP id 539B0140008 for ; Sun, 27 Oct 2024 17:58:27 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=AWGsfkbf; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf26.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730051870; a=rsa-sha256; cv=none; b=ULW4sUFS/dBQpm3fIPLGNga3ER3yppQNfmhdO/+9bUZNcIuy2YbtDDD9B+DHj39zBEcrnS jUnonyIs9rUQs94FZTvTXnUS4Zhyu3+HOAJNsLBmG/wfTBgX1KSgWCgH2ClNEB1iwcrk6T y4hM9GoCZXKD/6kyYW2X2vizNukjUPo= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=AWGsfkbf; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf26.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730051870; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7HBELsvSiP+CccX0d5orY/4TAyEDWFWAwNxu03tnWpk=; b=Co+qSTtVvLpkHIseT14beJP2OI/3zR4Qe9xRiXPvG2dMJY38sNT7G6pb0MA9Si9ohRPjXQ bf5lCW6tSI9gbdKhXPymINn2605ao1zZVBIHhw2yDBqlW3uGj5MnaFl9tggfMrA1vy9E9E xug/ib0x+qnMP98x+W13GmQSVlUE9xk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7HBELsvSiP+CccX0d5orY/4TAyEDWFWAwNxu03tnWpk=; b=AWGsfkbfnZzKYEA5W0gFbtsOmv sfwFfpwdBF2FXih87naNogfmWnfyrfoWY9IAahCrgeJXO9yd5ho08XdIVQ2CHZ1VzLagSOm2Q0q/+ IhPa0/clDwwDKWoQbdL8IgdEVO+64eN4fgl2nOV2UZS1ohS1gZt1OMw7sdn1qdZpWu8unrmTDu/Pk A972Oq7X+LIC3umUq5viUKIgJf8wKFitNSCXqtTfcmfhY/i7kMs8m5U0iPUqq4uilm9C0J1YPTgk8 S288Ll88BlrXWVAmAcZYpHfwhnXexb3tzlAAdkeq+JAnn9D0G7MWKyeTnBn+ogDz8v/2akbuu1fr8 gqJVXuUQ==; Received: from [187.36.213.55] (helo=morissey..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1t57Wz-00Fn6f-M7; Sun, 27 Oct 2024 18:58:26 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: Jonathan Corbet , Andrew Morton , Hugh Dickins , Barry Song , David Hildenbrand , Ryan Roberts , Baolin Wang , Lance Yang Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, =?utf-8?q?Ma=C3=ADra_C?= =?utf-8?q?anal?= Subject: [PATCH 1/3] mm: fix the format of the kernel parameter ``thp_anon=`` Date: Sun, 27 Oct 2024 14:36:37 -0300 Message-ID: <20241027175743.1056710-2-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241027175743.1056710-1-mcanal@igalia.com> References: <20241027175743.1056710-1-mcanal@igalia.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 539B0140008 X-Rspamd-Server: rspam01 X-Stat-Signature: jb9ug35jshshe3aatxjbjosnqkztyygu X-HE-Tag: 1730051907-360822 X-HE-Meta: U2FsdGVkX19OWj/W5bo0INa7V2IbFmg8xiFIccr/Tkp8HcdPIFUqyMSZRX9bC7lviImk2lbFY+4Wx1QWYg7EYBy/zDg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5TfoAkGQFH8/HNffPtkOXtx3WWjALGHTopTDuu8GJlfPrC80smryDNaM1pqyVP8u4r+yjRdFt9TfReX0fP5pBoUS+bzzXB9KluiLXTadCRoyDwTzlMUDJnThXcmjuOHU1lV4RaTzlbRl8PN5Atjn8YqsgiKUb6HTb+32mKegsU5VtJJ5vD7CjV/v3uq0ovgs9O2uevX93x X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: If we add ``thp_anon=32,64KB:always`` to the kernel command line, we will see the following error: [ 0.000000] huge_memory: thp_anon=32,64K:always: error parsing string, ignoring setting This happens because the correct format isn't ``thp_anon=,[KMG]:```, as [KMG] must follow each number to especify its unit. So, the correct format is ``thp_anon=[KMG],[KMG]:```. Therefore, adjust the documentation to reflect the correct format of the parameter ``thp_anon=``. Fixes: dd4d30d1cdbe ("mm: override mTHP "enabled" defaults at kernel cmdline") Signed-off-by: MaĆ­ra Canal Acked-by: Barry Song Acked-by: David Hildenbrand --- Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/admin-guide/mm/transhuge.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 1518343bbe22..1666576acc0e 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -6688,7 +6688,7 @@ 0: no polling (default) thp_anon= [KNL] - Format: ,[KMG]:;-[KMG]: + Format: [KMG],[KMG]:;[KMG]-[KMG]: state is one of "always", "madvise", "never" or "inherit". Control the default behavior of the system with respect to anonymous transparent hugepages. diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst index 203ba7aaf5fc..745055c3dc09 100644 --- a/Documentation/admin-guide/mm/transhuge.rst +++ b/Documentation/admin-guide/mm/transhuge.rst @@ -303,7 +303,7 @@ control by passing the parameter ``transparent_hugepage=always`` or kernel command line. Alternatively, each supported anonymous THP size can be controlled by -passing ``thp_anon=,[KMG]:;-[KMG]:``, +passing ``thp_anon=[KMG],[KMG]:;[KMG]-[KMG]:``, where ```` is the THP size (must be a power of 2 of PAGE_SIZE and supported anonymous THP) and ```` is one of ``always``, ``madvise``, ``never`` or ``inherit``.