From patchwork Fri Nov 1 16:54:05 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: 13859615 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 5FC28E6F070 for ; Fri, 1 Nov 2024 16:58:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EBD646B0096; Fri, 1 Nov 2024 12:58:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1FFB6B0098; Fri, 1 Nov 2024 12:58:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C99426B0099; Fri, 1 Nov 2024 12:58:01 -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 AB4216B0096 for ; Fri, 1 Nov 2024 12:58:01 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 63A0F140BE9 for ; Fri, 1 Nov 2024 16:58:01 +0000 (UTC) X-FDA: 82738132302.19.BBB39D5 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf11.hostedemail.com (Postfix) with ESMTP id A922D40028 for ; Fri, 1 Nov 2024 16:57:24 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=BI9jEnho; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf11.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=1730480160; a=rsa-sha256; cv=none; b=WcwRY48roZSoFzBsRh7b8pybtcwME8R7hkOsIsCb34KVNVngUejM/Dz2w1z0cb0riZMzEP ex1YH4Cl79GfKo0PrxG/fUDp7JKvZZ8t3W8x24VxuAbkNOcMUfKLdTZ2SG/4jCOKzKxRJN w4iHcjVjv276RvsjQ5HeIn887O5qlWg= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=BI9jEnho; dmarc=pass (policy=none) header.from=igalia.com; spf=pass (imf11.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=1730480160; 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=8BSVR7eAERprKgDeJ6doXC6uVFc0KlLSJulHHmYrLgw=; b=hCcQweosUoRaKJ7IUSttPdyNyisaZhr7yR+4h1hBc5e9+hpDIflhnrZy+G/+xnck76mi42 0QHHWvPJlNb9K2Tyf7laXXU2exm8RbIxipqhjmkF7zyHRJ1mdBv96MPvQ8+fLF7XNQ7kQx JEk56CdKllWVX8qt+OyRAH1vNinB5zU= 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=8BSVR7eAERprKgDeJ6doXC6uVFc0KlLSJulHHmYrLgw=; b=BI9jEnhon5ednLcCmYInr+vw6p mIMSqT39GTQyH04EYJP41wvD8Djx7wWK39wltY/y6DRYGVP9S2R+TcJZGtmSsYCf+q6g1ZeMSEtB5 kdbOUT86ij9a9EBhfo+8pAvicmbS1LUUdJFoWGxB0c+CU3+mkFxB2I4c7nZWpW08NEbe6kL41Y9nH dhbtEGveDTYllp9w0+roP8S67cDXZ+P/kW7PyvlF+eTVhcoMlrdDospIAYIMSaS5OWEohPedrAVV6 ADkLuALzBPrdSM/jj62rXeUWKDo8DeR1OQjQ9tfwdZR+WvCfRO4g68wOkXKXLJitwbcIne4miQwOE 8EOqjoJQ==; 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 1t6uy6-000VPu-FY; Fri, 01 Nov 2024 17:57:51 +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, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, =?utf-8?q?Ma=C3=ADra_Canal?= Subject: [PATCH v5 1/5] mm: fix docs for the kernel parameter ``thp_anon=`` Date: Fri, 1 Nov 2024 13:54:05 -0300 Message-ID: <20241101165719.1074234-3-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241101165719.1074234-2-mcanal@igalia.com> References: <20241101165719.1074234-2-mcanal@igalia.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A922D40028 X-Stat-Signature: tokbw7uru6rybwpbtjcwkedwn1f3st8g X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1730480244-142717 X-HE-Meta: U2FsdGVkX1/dlPV5ZlU/xLciKKFArlnEQAw1XnECyEKo07vZKjneJ0RSmIE+zjYK8EyIIIyct2ggOZQ+JftXvEzddEoE3B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0oF3g73d3ZagFkfZWBJ4lFBfP+wOSgEH6NSpH9qZ4iLOl4Y2UcIkfh+QY3lVKjddIlGSpTP69OZwM4BajvebAkN/DMejoHa+klVSRp88XlEtEArvJTiJTUIuZ65Wu1aT1urKgwfCjkwP/ify4kZo0DD/Y5bhlSwuGyvE0C81HSfL2tQdcP4ANtVOrSPKW7WjGiP5d8Qo/Xj3lLdMewURVxilVXFfgkrBuBi1m66aJHrTfWBcksnLVcmgpOj6aZTbq+iH3oBfPW9mxZeCnAJVHqJm1Dt4qjPU2slr+32VdeAtrfJH7ywxDB5YSaNqEn+OcgGXVNFvDkmYAMFdGw9eQ== 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,64K: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 5caa3fb2feb1..abdf10a1c7db 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``.