lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1988f61-e68d-4268-911b-8352fb49ea15@redhat.com>
Date: Mon, 26 Feb 2024 12:48:12 +0100
From: David Hildenbrand <david@...hat.com>
To: Liu Song <liusong@...ux.alibaba.com>,
 Yuanhe Shu <xiangzao@...ux.alibaba.com>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm, thp: display [never] for defrag when THP is set to
 never

On 26.02.24 12:22, Liu Song wrote:
> 
> 在 2024/2/26 16:54, David Hildenbrand 写道:
>> 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@...ux.alibaba.com>
>>>>> Signed-off-by: Yuanhe Shu <xiangzao@...ux.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.
> 
> We should explain this in the documentation, but to be honest, many
> people don't read the documentation, and even after we explicitly
> disable THP with transparent_hugepage=never, khugepaged/defrag is still
> set to 1, and users come asking why it's still defragging. We can't
> expect all users to have technical expertise, or to diligently read
> through the documentation; it would obviously be best if we could avoid
> user confusion altogether.

Then tell your users if a feature is enabled, other toggles that affect 
that feature are ignored. Basic 1on1.

If my care engine is off but it's not in neutral, it's not suddenly 
driving. And most users understand that reasoning.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ