linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Michal Hocko <mhocko@suse.com>, Dan Carpenter <dan.carpenter@oracle.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [bug report] hugetlb, mempolicy: fix the mbind hugetlb migration
Date: Wed, 17 Jan 2018 23:15:03 +0000	[thread overview]
Message-ID: <396fb669-3466-3c31-51a1-6c483351e0ce@ah.jp.nec.com> (raw)
In-Reply-To: <20180117121801.GE2900@dhcp22.suse.cz>

On 01/17/2018 09:18 PM, Michal Hocko wrote:
> On Wed 10-01-18 11:47:12, Michal Hocko wrote:
>> [CC Mike and Naoya]
> 
> ping
> 
>> From 7227218bd526cceb954a688727d78af0b5874e18 Mon Sep 17 00:00:00 2001
>> From: Michal Hocko <mhocko@suse.com>
>> Date: Wed, 10 Jan 2018 11:40:20 +0100
>> Subject: [PATCH] hugetlb, mbind: fall back to default policy if vma is NULL
>>
>> Dan Carpenter has noticed that mbind migration callback (new_page)
>> can get a NULL vma pointer and choke on it inside alloc_huge_page_vma
>> which relies on the VMA to get the hstate. We used to BUG_ON this
>> case but the BUG_+ON has been removed recently by "hugetlb, mempolicy:
>> fix the mbind hugetlb migration".
>>
>> The proper way to handle this is to get the hstate from the migrated
>> page and rely on huge_node (resp. get_vma_policy) do the right thing
>> with null VMA. We are currently falling back to the default mempolicy in
>> that case which is in line what THP path is doing here.

vma is used only for getting mempolicy in alloc_huge_page_vma(), so
falling back to default mempolicy looks better to me than BUG_ON.

Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

Thanks,
Naoya Horiguchi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-01-17 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:05 [bug report] hugetlb, mempolicy: fix the mbind hugetlb migration Dan Carpenter
2018-01-10 10:47 ` Michal Hocko
2018-01-17 12:18   ` Michal Hocko
2018-01-17 23:15     ` Naoya Horiguchi [this message]
2018-01-19  8:47       ` Michal Hocko

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=396fb669-3466-3c31-51a1-6c483351e0ce@ah.jp.nec.com \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.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;
as well as URLs for NNTP newsgroup(s).