From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (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 02E2F28B507; Tue, 22 Jul 2025 05:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753163996; cv=none; b=j/cNOkHMfXriMpudbEeJC2J7vzRCfWndFtLeKY85zdxImiwMSpSXTh/Ons5/maofCGUm3TclsfwzkLCn/CfyewEPy9QU4eCsEJiHvhiXYdMh/Qa4kjg3lroc7d7EO6iRpLEpf/f+hwo4K8JqhH5y06BCYewqk/fKViSiEusSbYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753163996; c=relaxed/simple; bh=hdMrxJ8Zr6JIBWaI8Iy3x33b6Iff3LdwD8t3CXUT3SA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AYVbsyRAKmnGWGgGDf7Zki46M5qbPda3TAMzPWFT3zUsdV8I1AoJo56t//XOcLw/AiCFYxZKDUeURBszHOslIpwDCWXQ12T5/xwobNKBNATu5/h7THGbEziK3dsxajRBMo5j/xFoD9NF8XtRJwYyWfAA/W5U+1lxGLLBzTdehO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=iz36moVP; arc=none smtp.client-ip=115.124.30.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="iz36moVP" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1753163984; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=ySiCGZAtj55OzR0IrY3iVRy0mm6ioSQe3uf0JRqArwE=; b=iz36moVPk2dom6dlJW1RxPVksiKYXMFR7OaliGSOZvdR846s+UnDp8lR99WKY9bZgbYL+ZR0Xu066un1nnKJr2eBeT1clycTRErjV+qnTwxqqA7GzraDhj9xhQj3MXfk5AXmv57LKuTEhhCOH8xOnwnH7rZ9qCi9HcIznvfaEyE= Received: from 30.74.144.108(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0WjUhTET_1753163982 cluster:ay36) by smtp.aliyun-inc.com; Tue, 22 Jul 2025 13:59:43 +0800 Message-ID: Date: Tue, 22 Jul 2025 13:59:42 +0800 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] docs: update THP documentation to clarify sysfs "never" setting To: Lorenzo Stoakes , Andrew Morton Cc: David Hildenbrand , Zi Yan , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Jonathan Corbet , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250721155530.75944-1-lorenzo.stoakes@oracle.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2025/7/22 13:34, Lorenzo Stoakes wrote: > Hi Andrew, > > Could you apply this fix-patch? It adds the caveat regarding MADV_COLLAPSE in a > couple other places whwere the sysfs 'never' mode is mentioned. > > Thanks, Lorenzo > > ----8<---- > From 7c0bdda6a633bc38e7d5a3b0acf2cef7bdc961af Mon Sep 17 00:00:00 2001 > From: Lorenzo Stoakes > Date: Tue, 22 Jul 2025 06:32:18 +0100 > Subject: [PATCH] docs: update admin guide transhuge page to mention > MADV_COLLAPSE everywhere > > We previously missed a couple places where the 'never' mode was described, > put the caveat regarding MADV_COLLAPSE in these locations also. > > Signed-off-by: Lorenzo Stoakes Thanks. Reviewed-by: Baolin Wang > --- > Documentation/admin-guide/mm/transhuge.rst | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst > index 182519197ef7..370fba113460 100644 > --- a/Documentation/admin-guide/mm/transhuge.rst > +++ b/Documentation/admin-guide/mm/transhuge.rst > @@ -385,7 +385,9 @@ always > Attempt to allocate huge pages every time we need a new page; > > never > - Do not allocate huge pages; > + Do not allocate huge pages. Note that ``madvise(..., MADV_COLLAPSE)`` > + can still cause transparent huge pages to be obtained even if this mode > + is specified everywhere; > > within_size > Only allocate huge page if it will be fully within i_size. > @@ -441,7 +443,9 @@ inherit > have enabled="inherit" and all other hugepage sizes have enabled="never"; > > never > - Do not allocate huge pages; > + Do not allocate huge pages. Note that ``madvise(..., > + MADV_COLLAPSE)`` can still cause transparent huge pages to be obtained > + even if this mode is specified everywhere; > > within_size > Only allocate huge page if it will be fully within i_size. > -- > 2.50.1