All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Jerome Glisse <jglisse@redhat.com>,
	Ralph Campbell <rcampbell@nvidia.com>,
	Felix.Kuehling@amd.com, linux-mm@kvack.org,
	John Hubbard <jhubbard@nvidia.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	Philip Yang <Philip.Yang@amd.com>
Subject: Re: [PATCH  hmm 8/8] mm/hmm: add missing call to hmm_pte_need_fault in HMM_PFN_SPECIAL handling
Date: Mon, 16 Mar 2020 13:49:53 +0100	[thread overview]
Message-ID: <20200316124953.GC17386@lst.de> (raw)
In-Reply-To: <20200316121053.GP13183@mellanox.com>

On Mon, Mar 16, 2020 at 09:10:53AM -0300, Jason Gunthorpe wrote:
> On Mon, Mar 16, 2020 at 10:13:47AM +0100, Christoph Hellwig wrote:
> > On Wed, Mar 11, 2020 at 03:35:06PM -0300, Jason Gunthorpe wrote:
> > > From: Jason Gunthorpe <jgg@mellanox.com>
> > > 
> > > Currently if a special PTE is encountered hmm_range_fault() immediately
> > > returns EFAULT and sets the HMM_PFN_SPECIAL error output (which nothing
> > > uses).
> > > 
> > > EFAULT should only be returned after testing with hmm_pte_need_fault().
> > > 
> > > Also pte_devmap() and pte_special() are exclusive, and there is no need to
> > > check IS_ENABLED, pte_special() is stubbed out to return false on
> > > unsupported architectures.
> > 
> > I think the right fix is to just kill HMM_PFN_SPECIAL and treat any
> > fault on special ptes that aren't the zero page as an error.
>  
> I have another series that is doing that - this change is to make the
> next series make sense and not introduce new control logic too.

Ok.  I had some cleanups like this based of older trees, but if you are
active in this area I think I'll let you handle it.

> Even when this is switched to ERROR it still needs to have the
> hmm_range_fault() logic this patch introduces.

True.


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Philip Yang <Philip.Yang@amd.com>,
	Ralph Campbell <rcampbell@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Felix.Kuehling@amd.com, dri-devel@lists.freedesktop.org,
	linux-mm@kvack.org, Jerome Glisse <jglisse@redhat.com>,
	amd-gfx@lists.freedesktop.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH  hmm 8/8] mm/hmm: add missing call to hmm_pte_need_fault in HMM_PFN_SPECIAL handling
Date: Mon, 16 Mar 2020 13:49:53 +0100	[thread overview]
Message-ID: <20200316124953.GC17386@lst.de> (raw)
In-Reply-To: <20200316121053.GP13183@mellanox.com>

On Mon, Mar 16, 2020 at 09:10:53AM -0300, Jason Gunthorpe wrote:
> On Mon, Mar 16, 2020 at 10:13:47AM +0100, Christoph Hellwig wrote:
> > On Wed, Mar 11, 2020 at 03:35:06PM -0300, Jason Gunthorpe wrote:
> > > From: Jason Gunthorpe <jgg@mellanox.com>
> > > 
> > > Currently if a special PTE is encountered hmm_range_fault() immediately
> > > returns EFAULT and sets the HMM_PFN_SPECIAL error output (which nothing
> > > uses).
> > > 
> > > EFAULT should only be returned after testing with hmm_pte_need_fault().
> > > 
> > > Also pte_devmap() and pte_special() are exclusive, and there is no need to
> > > check IS_ENABLED, pte_special() is stubbed out to return false on
> > > unsupported architectures.
> > 
> > I think the right fix is to just kill HMM_PFN_SPECIAL and treat any
> > fault on special ptes that aren't the zero page as an error.
>  
> I have another series that is doing that - this change is to make the
> next series make sense and not introduce new control logic too.

Ok.  I had some cleanups like this based of older trees, but if you are
active in this area I think I'll let you handle it.

> Even when this is switched to ERROR it still needs to have the
> hmm_range_fault() logic this patch introduces.

True.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-03-16 12:49 UTC|newest]

Thread overview: 153+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 18:34 [PATCH hmm 0/8] Various error case bug fixes for hmm_range_fault() Jason Gunthorpe
2020-03-11 18:34 ` Jason Gunthorpe
2020-03-11 18:34 ` Jason Gunthorpe
2020-03-11 18:34 ` [PATCH hmm 1/8] mm/hmm: add missing unmaps of the ptep during hmm_vma_handle_pte() Jason Gunthorpe
2020-03-11 18:34   ` Jason Gunthorpe
2020-03-11 18:34   ` Jason Gunthorpe
2020-03-12  1:28   ` Ralph Campbell
2020-03-12  1:28     ` Ralph Campbell
2020-03-12  1:28     ` Ralph Campbell
2020-03-12 14:24     ` Jason Gunthorpe
2020-03-12 14:24       ` Jason Gunthorpe
2020-03-12 14:24       ` Jason Gunthorpe
2020-03-16  8:58   ` Christoph Hellwig
2020-03-16  8:58     ` Christoph Hellwig
2020-03-11 18:35 ` [PATCH hmm 2/8] mm/hmm: don't free the cached pgmap while scanning Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:29   ` Ralph Campbell
2020-03-12  1:29     ` Ralph Campbell
2020-03-12  1:29     ` Ralph Campbell
2020-03-16  9:02   ` Christoph Hellwig
2020-03-16  9:02     ` Christoph Hellwig
2020-03-16 18:07     ` Jason Gunthorpe
2020-03-16 18:07       ` Jason Gunthorpe
2020-03-16 18:07       ` Jason Gunthorpe
2020-03-16 18:13       ` Christoph Hellwig
2020-03-16 18:13         ` Christoph Hellwig
2020-03-16 19:23         ` Jason Gunthorpe
2020-03-16 19:23           ` Jason Gunthorpe
2020-03-16 19:23           ` Jason Gunthorpe
2020-03-11 18:35 ` [PATCH hmm 3/8] mm/hmm: do not call hmm_vma_walk_hole() while holding a spinlock Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:31   ` Ralph Campbell
2020-03-12  1:31     ` Ralph Campbell
2020-03-12  1:31     ` Ralph Campbell
2020-03-12  8:54   ` Steven Price
2020-03-12  8:54     ` Steven Price
2020-03-12  8:54     ` Steven Price
2020-03-12 10:28     ` [PATCH] mm/hmm: Simplify hmm_vma_walk_pud slightly Steven Price
2020-03-12 10:28       ` Steven Price
2020-03-12 10:28       ` Steven Price
2020-03-12 14:27       ` Jason Gunthorpe
2020-03-12 14:27         ` Jason Gunthorpe
2020-03-12 14:27         ` Jason Gunthorpe
2020-03-12 14:40         ` Steven Price
2020-03-12 14:40           ` Steven Price
2020-03-12 14:40           ` Steven Price
2020-03-12 15:11           ` Jason Gunthorpe
2020-03-12 15:11             ` Jason Gunthorpe
2020-03-12 15:11             ` Jason Gunthorpe
2020-03-12 16:16             ` Steven Price
2020-03-12 16:16               ` Steven Price
2020-03-12 16:16               ` Steven Price
2020-03-12 16:37               ` Jason Gunthorpe
2020-03-12 16:37                 ` Jason Gunthorpe
2020-03-12 16:37                 ` Jason Gunthorpe
2020-03-12 17:02                 ` Steven Price
2020-03-12 17:02                   ` Steven Price
2020-03-12 17:02                   ` Steven Price
2020-03-12 17:17                   ` Jason Gunthorpe
2020-03-12 17:17                     ` Jason Gunthorpe
2020-03-12 17:17                     ` Jason Gunthorpe
2020-03-13 19:55                   ` Jason Gunthorpe
2020-03-13 19:55                     ` Jason Gunthorpe
2020-03-13 19:55                     ` Jason Gunthorpe
2020-03-13 21:04                     ` Matthew Wilcox
2020-03-13 21:04                       ` Matthew Wilcox
2020-03-13 21:04                       ` Matthew Wilcox
2020-03-13 22:51                       ` Jason Gunthorpe
2020-03-13 22:51                         ` Jason Gunthorpe
2020-03-13 22:51                         ` Jason Gunthorpe
2020-03-16  9:05   ` [PATCH hmm 3/8] mm/hmm: do not call hmm_vma_walk_hole() while holding a spinlock Christoph Hellwig
2020-03-16  9:05     ` Christoph Hellwig
2020-03-16 12:56     ` Jason Gunthorpe
2020-03-16 12:56       ` Jason Gunthorpe
2020-03-16 12:56       ` Jason Gunthorpe
2020-03-11 18:35 ` [PATCH hmm 4/8] mm/hmm: add missing pfns set to hmm_vma_walk_pmd() Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:33   ` Ralph Campbell
2020-03-12  1:33     ` Ralph Campbell
2020-03-12  1:33     ` Ralph Campbell
2020-03-16  9:06   ` Christoph Hellwig
2020-03-16  9:06     ` Christoph Hellwig
2020-03-11 18:35 ` [PATCH hmm 5/8] mm/hmm: add missing call to hmm_range_need_fault() before returning EFAULT Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:34   ` Ralph Campbell
2020-03-12  1:34     ` Ralph Campbell
2020-03-12  1:34     ` Ralph Campbell
2020-03-16  9:07   ` Christoph Hellwig
2020-03-16  9:07     ` Christoph Hellwig
2020-03-11 18:35 ` [PATCH hmm 6/8] mm/hmm: reorganize how !pte_present is handled in hmm_vma_handle_pte() Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:36   ` Ralph Campbell
2020-03-12  1:36     ` Ralph Campbell
2020-03-12  1:36     ` Ralph Campbell
2020-03-16  9:11   ` Christoph Hellwig
2020-03-16  9:11     ` Christoph Hellwig
2020-03-11 18:35 ` [PATCH hmm 7/8] mm/hmm: return -EFAULT when setting HMM_PFN_ERROR on requested valid pages Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:36   ` Ralph Campbell
2020-03-12  1:36     ` Ralph Campbell
2020-03-12  1:36     ` Ralph Campbell
2020-03-12 14:35     ` Jason Gunthorpe
2020-03-12 14:35       ` Jason Gunthorpe
2020-03-12 14:35       ` Jason Gunthorpe
2020-03-16  9:12   ` Christoph Hellwig
2020-03-16  9:12     ` Christoph Hellwig
2020-03-11 18:35 ` [PATCH hmm 8/8] mm/hmm: add missing call to hmm_pte_need_fault in HMM_PFN_SPECIAL handling Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-11 18:35   ` Jason Gunthorpe
2020-03-12  1:38   ` Ralph Campbell
2020-03-12  1:38     ` Ralph Campbell
2020-03-12  1:38     ` Ralph Campbell
2020-03-16  9:13   ` Christoph Hellwig
2020-03-16  9:13     ` Christoph Hellwig
2020-03-16 12:10     ` Jason Gunthorpe
2020-03-16 12:10       ` Jason Gunthorpe
2020-03-16 12:10       ` Jason Gunthorpe
2020-03-16 12:49       ` Christoph Hellwig [this message]
2020-03-16 12:49         ` Christoph Hellwig
2020-03-16 13:04         ` Jason Gunthorpe
2020-03-16 13:04           ` Jason Gunthorpe
2020-03-16 13:04           ` Jason Gunthorpe
2020-03-16 13:12           ` Christoph Hellwig
2020-03-16 13:12             ` Christoph Hellwig
2020-03-17 12:32             ` Christoph Hellwig
2020-03-17 12:32               ` Christoph Hellwig
2020-03-17 12:53               ` Jason Gunthorpe
2020-03-17 12:53                 ` Jason Gunthorpe
2020-03-17 12:53                 ` Jason Gunthorpe
2020-03-17 13:06                 ` Christoph Hellwig
2020-03-17 13:06                   ` Christoph Hellwig
2020-03-17 13:25                   ` Jason Gunthorpe
2020-03-17 13:25                     ` Jason Gunthorpe
2020-03-17 13:25                     ` Jason Gunthorpe
2020-03-16 12:51   ` Christoph Hellwig
2020-03-16 12:51     ` Christoph Hellwig
2020-03-12 19:33 ` [PATCH hmm 9/8] mm/hmm: do not check pmd_protnone twice in hmm_vma_handle_pmd() Jason Gunthorpe
2020-03-12 19:33   ` Jason Gunthorpe
2020-03-12 19:33   ` Jason Gunthorpe
2020-03-12 23:50   ` Ralph Campbell
2020-03-12 23:50     ` Ralph Campbell
2020-03-12 23:50     ` Ralph Campbell
2020-03-16  9:14   ` Christoph Hellwig
2020-03-16  9:14     ` Christoph Hellwig
2020-03-16 18:25 ` [PATCH hmm 0/8] Various error case bug fixes for hmm_range_fault() Jason Gunthorpe
2020-03-16 18:25   ` Jason Gunthorpe
2020-03-16 18:25   ` Jason Gunthorpe

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=20200316124953.GC17386@lst.de \
    --to=hch@lst.de \
    --cc=Felix.Kuehling@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@mellanox.com \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=rcampbell@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.