[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200118170445.370d908ce29f42068390addb@linux-foundation.org>
Date: Sat, 18 Jan 2020 17:04:45 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Rientjes <rientjes@...gle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch v2] mm, thp: fix defrag setting if newline is not used
On Fri, 17 Jan 2020 14:11:48 -0800 (PST) David Rientjes <rientjes@...gle.com> wrote:
> If thp defrag setting "defer" is used and a newline is *not* used when
> writing to the sysfs file, this is interpreted as the "defer+madvise"
> option.
>
> This is because we do prefix matching and if five characters are written
> without a newline, the current code ends up comparing to the first five
> bytes of the "defer+madvise" option and using that instead.
>
> Use the more appropriate sysfs_streq() that handles the trailing newline
> for us. Since this doubles as a nice cleanup, do it in enabled_store()
> as well.
I can't really I really understand this prefix-matching thing that
we're taking away. Documentation/admin-guide/mm/transhuge.rst doesn't
appear to mention it. Could we please add a paragraph to the changelog
to spell all this out. Bonus points for formally describing the
behaviour which we're removing!
Thanks.
Powered by blists - more mailing lists