linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox.com>
To: "Yang, Philip" <Philip.Yang@amd.com>
Cc: "jglisse@redhat.com" <jglisse@redhat.com>,
	"alex.deucher@amd.com" <alex.deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] mm/hmm: hmm_range_fault handle pages swapped out
Date: Fri, 23 Aug 2019 13:39:53 +0000	[thread overview]
Message-ID: <20190823133943.GF12847@mellanox.com> (raw)
In-Reply-To: <20190815205227.7949-1-Philip.Yang@amd.com>

On Thu, Aug 15, 2019 at 08:52:56PM +0000, Yang, Philip wrote:
> hmm_range_fault may return NULL pages because some of pfns are equal to
> HMM_PFN_NONE. This happens randomly under memory pressure. The reason is
> for swapped out page pte path, hmm_vma_handle_pte doesn't update fault
> variable from cpu_flags, so it failed to call hmm_vam_do_fault to swap
> the page in.
> 
> The fix is to call hmm_pte_need_fault to update fault variable.
> 
> Change-Id: I2e8611485563d11d938881c18b7935fa1e7c91ee
> Signed-off-by: Philip Yang <Philip.Yang@amd.com>
>  mm/hmm.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied to hmm.git, thanks

I fixed the commit message:

Author: Yang, Philip <Philip.Yang@amd.com>
Date:   Thu Aug 15 20:52:56 2019 +0000

    mm/hmm: fix hmm_range_fault()'s handling of swapped out pages
    
    hmm_range_fault() may return NULL pages because some of the pfns are equal
    to HMM_PFN_NONE. This happens randomly under memory pressure. The reason
    is during the swapped out page pte path, hmm_vma_handle_pte() doesn't
    update the fault variable from cpu_flags, so it failed to call
    hmm_vam_do_fault() to swap the page in.
    
    The fix is to call hmm_pte_need_fault() to update fault variable.
    
    Fixes: 74eee180b935 ("mm/hmm/mirror: device page fault handler")
    Link: https://lore.kernel.org/r/20190815205227.7949-1-Philip.Yang@amd.com
    Signed-off-by: Philip Yang <Philip.Yang@amd.com>
    Reviewed-by: "Jérôme Glisse" <jglisse@redhat.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

      parent reply	other threads:[~2019-08-23 13:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 20:52 [PATCH] mm/hmm: hmm_range_fault handle pages swapped out Yang, Philip
2019-08-15 21:02 ` Jerome Glisse
2019-08-16  0:54 ` Jason Gunthorpe
2019-08-16 16:02   ` Yang, Philip
2019-08-23 13:39 ` Jason Gunthorpe [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=20190823133943.GF12847@mellanox.com \
    --to=jgg@mellanox.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=alex.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jglisse@redhat.com \
    --cc=linux-mm@kvack.org \
    /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).