lkml.org 
[lkml]   [2024]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm, thp: display [never] for defrag when THP is set to never
From
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


\
 
 \ /
  Last update: 2024-05-27 15:21    [W:1.453 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site