From nobody Sun Nov 24 22:32:51 2024 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86AD01CBE82; Fri, 1 Nov 2024 16:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.60.130.6 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730479450; cv=none; b=grZqwIvVTSDH2h/jXqxKWoHQm8xInbwarGHM5h/SX0L33nFuV8pz4MNYi8g71+HM4fFtlCpc+3dBjw0GKL7q7UR+19u9H3A8xS9jLCjkW0yrU/GdtNmgFv7CVTZIGEbTQ525AypANeDcdxWmqZOUGwm8K7N97aPhX6o3nkOHeeA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730479450; c=relaxed/simple; bh=CfopfRF6+wuYULvRjMimxddxy11nsiHKE0xvJuzLbNI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rplp1Qh4ZpTFwgt44P2gHJ/Pwup0HwAA/CL3/pVzSV/t1M7YMSqOi207Hw5IHw0nSp31H/vJgGtf4zxLjYHi/oyvTjDzCTDkeZLX1BkiQrxBXP7td7pqSj8RzpWcs/YUr1x0CZ4F36UarTfRnMqK4UYXINePvIfRvz4ChOy0NkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=DAf8W6rj; arc=none smtp.client-ip=178.60.130.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="DAf8W6rj" 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=DAf8W6rj4sGQ1pVJpVHNr5uElU qF5GdXXIFPvp3rk4vrHyP7cDCSJQJM/Ose1bN/RPcg9s89Oqj7P/skzNqCAp4meggmmtuqpU3+EXy l4bX/eZ+BovJ3kiVQsLBwSUqR41dHNaymaCn45L71Ov8m1J8TeJSS7SnNnIIv7Q1Jz50QltIJYvgz qLNFXvx4TndNwVbCc0Ugto+36fnTECzGMZ4LeRgQG2I6380kAxsDoHsLeg9cLxp2rTsE9IE1FYe0I 4PV3SplVuI6NN3ol/q6aXTLSTukPhfmdBDbCOQPX2JBSWU/ptIMRxtvNL3rVUu+/mFH9G8iSAae49 MmM/IAsQ==; 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 1t6ukf-000V38-0G; Fri, 01 Nov 2024 17:43:57 +0100 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= 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=20Canal?= Subject: [PATCH v4 1/5] mm: fix docs for the kernel parameter ``thp_anon=`` Date: Fri, 1 Nov 2024 13:38:42 -0300 Message-ID: <20241101164313.1073238-3-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241101164313.1073238-2-mcanal@igalia.com> References: <20241101164313.1073238-2-mcanal@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable If we add ``thp_anon=3D32,64K:always`` to the kernel command line, we will see the following error: [ 0.000000] huge_memory: thp_anon=3D32,64K:always: error parsing string,= ignoring setting This happens because the correct format isn't ``thp_anon=3D,[KM= G]:```, as [KMG] must follow each number to especify its unit. So, the correct format is ``thp_anon=3D[KMG],[KMG]:```. Therefore, adjust the documentation to reflect the correct format of the parameter ``thp_anon=3D``. Fixes: dd4d30d1cdbe ("mm: override mTHP "enabled" defaults at kernel cmdlin= e") Signed-off-by: Ma=C3=ADra 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/Documentatio= n/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) =20 thp_anon=3D [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/adm= in-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= =3Dalways`` or kernel command line. =20 Alternatively, each supported anonymous THP size can be controlled by -passing ``thp_anon=3D,[KMG]:;-[KMG]:= ``, +passing ``thp_anon=3D[KMG],[KMG]:;[KMG]-[KM= G]:``, 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``. --=20 2.46.2