linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Michal Hocko <mhocko@suse.com>
Cc: linux-mm@kvack.org, aarcange@redhat.com, akpm@linux-foundation.org
Subject: Re: [PATCH 0/3] mm: Rework {enabled,defrag}_{show,store}
Date: Fri, 31 Jan 2020 09:12:12 +1100	[thread overview]
Message-ID: <010e4e48-f3ea-76f0-6e64-518eec980a5e@redhat.com> (raw)
In-Reply-To: <20200130074901.GR24244@dhcp22.suse.cz>

On 1/30/20 6:49 PM, Michal Hocko wrote:
> On Thu 30-01-20 13:24:38, Gavin Shan wrote:
>> The inappropriate settings can be accepted by "enabled" and "defrag"
>> interface, as the following example shows. This series reworks the
>> related functions and fixes the issue by the way.
> 
> Do we really care? This is a root only interface and we do expect root
> to know how to use the interface.
> 

I'm not sure actually, but the behavior (suffix matching) isn't well documented
in admin-guide/mm/transhuge.rst at least. I think it's not bad to enforce a
full matching here because even root user can input something wrong :)

Thanks,
Gavin.

>>     # cat /sys/kernel/mm/transparent_hugepage/enabled
>>       always [madvise] never
>>     # echo neveroff > /sys/kernel/mm/transparent_hugepage/enabled
>>     # cat /sys/kernel/mm/transparent_hugepage/enabled
>>       always madvise [never]
>>
>> Gavin Shan (3):
>>    mm: Rework {enabled,defrag}_store()
>>    mm: Rework {enabled,defrag}_show()
>>    mm: Rework setup_transparent_hugepage()
>>
>>   mm/huge_memory.c | 216 +++++++++++++++++++++++++++--------------------
>>   1 file changed, 125 insertions(+), 91 deletions(-)
>>
>> -- 
>> 2.23.0
>>
> 



      parent reply	other threads:[~2020-01-30 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30  2:24 Gavin Shan
2020-01-30  7:49 ` Michal Hocko
2020-01-30  9:46   ` Vlastimil Babka
2020-01-30 22:22     ` Gavin Shan
2020-01-30 22:12   ` Gavin Shan [this message]

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=010e4e48-f3ea-76f0-6e64-518eec980a5e@redhat.com \
    --to=gshan@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.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