From: Yang Shi <yang.shi@linux.alibaba.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jan Kara <jack@suse.cz>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux MM <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: enforce THP for VM_NOHUGEPAGE dax mappings
Date: Fri, 28 Sep 2018 15:43:04 -0700 [thread overview]
Message-ID: <def53b95-804d-d3c5-179c-e1862a5d8e8c@linux.alibaba.com> (raw)
In-Reply-To: <CAPcyv4jdTWoJMSPuxso=8fu8nGOrmbBPYxkJvsuEDfJSYvsDWg@mail.gmail.com>
On 9/28/18 3:36 PM, Dan Williams wrote:
> On Fri, Sep 28, 2018 at 3:34 PM <yang.shi@linux.alibaba.com> wrote:
>> commit baabda261424517110ea98c6651f632ebf2561e3 ("mm: always enable thp
>> for dax mappings") says madvise hguepage policy makes less sense for
>> dax, and force enabling thp for dax mappings in all cases, even though
>> THP is set to "never".
>>
>> However, transparent_hugepage_enabled() may return false if
>> VM_NOHUGEPAGE is set even though the mapping is dax.
>>
>> So, move is_vma_dax() check to the very beginning to enforce THP for dax
>> mappings in all cases.
>>
>> Cc: Dan Williams <dan.j.williams@intel.com>
>> Cc: Jan Kara <jack@suse.cz>
>> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
>> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
>> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
>> ---
>> I didn't find anyone mention the check should be before VM_NOHUGEPAGE in
>> the review for Dan's original patch. And, that patch commit log states
>> clearly that THP for dax mapping for all cases even though THP is never.
>> So, I'm supposed it should behave in this way.
> No, if someone explicitly does MADV_NOHUGEPAGE then the kernel should
> honor that, even if the mapping is DAX.
Thanks for confirming this. Actually, I had the same question before I
came up with this patch. "all cases" sounds a little bit misleading.
prev parent reply other threads:[~2018-09-28 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 22:31 Yang Shi
2018-09-28 22:36 ` Dan Williams
2018-09-28 22:43 ` Yang Shi [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=def53b95-804d-d3c5-179c-e1862a5d8e8c@linux.alibaba.com \
--to=yang.shi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ross.zwisler@linux.intel.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