linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Dan Carpenter <dan.carpenter@oracle.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: Fri, 19 Jan 2018 09:47:48 +0100	[thread overview]
Message-ID: <20180119084748.GQ6584@dhcp22.suse.cz> (raw)
In-Reply-To: <396fb669-3466-3c31-51a1-6c483351e0ce@ah.jp.nec.com>

On Wed 17-01-18 23:15:03, Naoya Horiguchi wrote:
> 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 for the review Naoya!
-- 
Michal Hocko
SUSE Labs

--
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-19  8:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:05 Dan Carpenter
2018-01-10 10:47 ` Michal Hocko
2018-01-17 12:18   ` Michal Hocko
2018-01-17 23:15     ` Naoya Horiguchi
2018-01-19  8:47       ` Michal Hocko [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=20180119084748.GQ6584@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=n-horiguchi@ah.jp.nec.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