linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Liu Song <liusong@linux.alibaba.com>,
	Yuanhe Shu <xiangzao@linux.alibaba.com>,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm, thp: display [never] for defrag when THP is set to never
Date: Mon, 26 Feb 2024 09:54:13 +0100	[thread overview]
Message-ID: <8a723092-347d-443a-82e1-4093f6a1ba0e@redhat.com> (raw)
In-Reply-To: <d9eb6672-788e-414d-8138-37a3038e3c47@linux.alibaba.com>

On 23.02.24 12:01, Liu Song wrote:
> 
> 在 2024/2/22 20:14, David Hildenbrand 写道:
>> On 22.02.24 12:53, Yuanhe Shu wrote:
>>> When transparent_hugepage is set to never by cmdline or echo, defrag
>>> still show what it used to be and can be modified which makes user
>>> confusing whether defrag would take effect.
>>>
>>> Actually if transparent_hugepage is set to never, defrag will not take
>>> effect. Just Display never and remain unchangeable to for defrag when
>>> transparent_hugepage is set to never.
>>>
>>> Suggested-by: Liu Song <liusong@linux.alibaba.com>
>>> Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
>>> ---
>>
>> No, I don't think we want such a dependency between both options.
>>
>> You might just end up breaking existing scripts (enable defrag before
>> enabling THP) for no good reason.
>>
> In certain situations where khugepaged_thread is NULL, it would be more
> reasonable for the value of
> /sys/kernel/mm/transparent_hugepage/khugepaged/defrag to be 0. The patch
> should include a fix for this case.

Why?

We have a bunch of THP toggles. They reside in 
"/sys/kernel/mm/transparent_hugepage/", indicating that they are THP 
specific.

Some of them are only in effect if some other toggles are set.

That is very common practice.

If you think something could be confusing, maybe clarify the doc? I 
don't immediately see why any code changes are required, really.

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2024-02-26  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 11:53 [PATCH] mm, thp: display [never] for defrag when THP is set to never Yuanhe Shu
2024-02-22 12:14 ` David Hildenbrand
2024-02-23 11:01   ` Liu Song
2024-02-26  8:54     ` David Hildenbrand [this message]
2024-02-26 11:22       ` Liu Song
2024-02-26 11:48         ` David Hildenbrand
2024-02-26 11:49           ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a723092-347d-443a-82e1-4093f6a1ba0e@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liusong@linux.alibaba.com \
    --cc=xiangzao@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).