linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.com>
Cc: linux-mm@kvack.org, aarcange@redhat.com,
	akpm@linux-foundation.org, David Rientjes <rientjes@google.com>
Subject: Re: [PATCH 0/3] mm: Rework {enabled,defrag}_{show,store}
Date: Fri, 31 Jan 2020 09:22:55 +1100	[thread overview]
Message-ID: <a8291be9-5164-7053-4d80-a1ebfda78c7f@redhat.com> (raw)
In-Reply-To: <4eb439e9-fd36-dd72-46fd-957abae98f9b@suse.cz>

On 1/30/20 8:46 PM, Vlastimil Babka wrote:
> On 1/30/20 8:49 AM, 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.
> 
> Also I think David already solved even this case with sysfs_streq() that
> Andrew suggested:
> 
> https://lore.kernel.org/linux-mm/alpine.DEB.2.21.2001171411020.56385@chino.kir.corp.google.com/
> 

Thanks for the linker. I didn't notice there already have a patch to address
the issue. Also, I perhaps post patch to improve the extendibility on top of
David's patch if you agree. Otherwise, it can be ignored.

By the way, it's nice to know sysfs_streq().

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
>>>
>>
> 



  reply	other threads:[~2020-01-30 22:23 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 [this message]
2020-01-30 22:12   ` Gavin Shan

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=a8291be9-5164-7053-4d80-a1ebfda78c7f@redhat.com \
    --to=gshan@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    /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