From patchwork Wed Oct 30 12:58:55 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: 13856489 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 3B013D5CCAA for ; Wed, 30 Oct 2024 13:03:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B5BB6B00BF; Wed, 30 Oct 2024 09:03:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16C896B00C4; Wed, 30 Oct 2024 09:03:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC0276B00C1; Wed, 30 Oct 2024 09:03:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B29BA6B00BF for ; Wed, 30 Oct 2024 09:03:54 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4F720120C2D for ; Wed, 30 Oct 2024 13:03:54 +0000 (UTC) X-FDA: 82730285358.05.6752167 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by imf12.hostedemail.com (Postfix) with ESMTP id B965140029 for ; Wed, 30 Oct 2024 13:03:40 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=eUcKZTex; spf=pass (imf12.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730293352; 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=x/+J4VNwyIjYndlAztlVz2EFWQN/WXmhUknqKDEMai0=; b=0bT5y+2YVulCNjyPd45gYVXaQ6JCota1OeVBJwmqxRoiL2StT63huqoMLAUQyvWeCLi9Bg GLBIBuoUn/lDJtBUHiysHjhZ1NjTbjEqYjILelJ++y0EKJ53ldKuwNra32YrJ29wtN9beZ QlR7blkOqLTDj8Yc1VCClcQC9l2KC4w= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=igalia.com header.s=20170329 header.b=eUcKZTex; spf=pass (imf12.hostedemail.com: domain of mcanal@igalia.com designates 178.60.130.6 as permitted sender) smtp.mailfrom=mcanal@igalia.com; dmarc=pass (policy=none) header.from=igalia.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730293352; a=rsa-sha256; cv=none; b=d9VxBMsfE2by+ZA9SfPcXQNhhX2N9pV+mJTZD0GHbGTheK/+PNbUBqz7vD2NX9uYI2VNK1 h9EK1ItIOdCx5WgpU/5szqVO4SfMhyAGiG5rC8LmmsYX+gaMJvG//uuaimFh/PYg5UNo1f LfTASx+KRLHVv+8PyGKcqVyDqzLkpYQ= 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=x/+J4VNwyIjYndlAztlVz2EFWQN/WXmhUknqKDEMai0=; b=eUcKZTexxC8M2Wcn30sWoZqyrh LRP8JP0FKQ7H6mI4jJPzJasXn5FjP4SI+86Rk4Y2y+LLjP5yX8tNfAF7HOupm4XdtVK6GYJJltnXv Bii1xx1Lszwsm1Sk9XipuwCR7WesaGLsQWxv1K8M4nDfto6PNgH91hdlxpZw/U8TmeR3WkUCaxwxP 9e05jUf7ku16Xrdqq5krv0SN2z2/ktQAPwydgXKS2DaY/XYz88gcC1yI6Ifwo7iXUkvjmfcUr9YgO HGBP1vZXhg4m0Gh89vceRFzZgwj23LY6lgdxkFEmqno/aBR4spbKMiHFHtUzsjB9SyvtY9BTvrmjz d4nXaHRQ==; 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 1t68MI-00H5h8-GV; Wed, 30 Oct 2024 14:03:35 +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 v3 1/4] mm: fix docs for the kernel parameter ``thp_anon=`` Date: Wed, 30 Oct 2024 09:58:55 -0300 Message-ID: <20241030130308.1066299-2-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241030130308.1066299-1-mcanal@igalia.com> References: <20241030130308.1066299-1-mcanal@igalia.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: B965140029 X-Stat-Signature: adh43yaa8uux9zqg3p596xz6nez4bb9a X-HE-Tag: 1730293420-822709 X-HE-Meta: U2FsdGVkX18T8exqurft4HF9yWhQoA3NbD030EPi133bRw2BXZiqzVovhoEaWDEvitYbhjaqRaK8OpZP5CScWTSq9rcH/1u/A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82hi2NG8CBoXJ3fKhpssFFY8zRHW0z5AZAdEOLG24G2ddFMctgnDOtT3+lKLnieW91FbL+fl6Pir9IA7qPRJm+e/6MUufHe+nbdP1+MHpIVZBXQdaG/ny1yyMm9icjR2P2wiQkKG8YkbEQ2ME1yw9gTnAcHdxioFlRs4AzsJBfA1Qtrjt1/MvHkZYO7sMRnsK3ZIrArEcpSdP6w6xxxgDXnhBioc3+L646r56s= 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 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``.