!folio_is_zone_movable(folio);
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
(cb)(struct inode *))
@@ -979,6 +981,7 @@ void dax_break_mapping_uninterruptible(struct inode *inode,
if (!page)
dax_delete_mapping_range(inode->i_mapping, 0, LLONG_MAX);
}
+EXPORT_SYMBOL_GPL(dax_break_mapping_uninterruptible);
/*
* Invalidate DAX entry if it is c
| 2 +-
6 files changed, 21 insertions(+), 8 deletions(-)
This completely fixes the uffd-unit-test behavior, I just did a quick
test run to be sure as well.
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
ind
| 3 ++-
mm/memory.c | 2 +-
6 files changed, 21 insertions(+), 8 deletions(-)
--
2.45.0.118.g7fe29c98d7-goog
thanks,
--
John Hubbard
NVIDIA
+-
mm/khugepaged.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Yes, everything is changed over now, confirmed.
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
ch/sh/Kconfig| 2 +-
arch/x86/Kconfig | 2 +-
include/linux/rmap.h | 8
kernel/events/core.c | 4 ++--
mm/Kconfig | 2 +-
mm/gup.c | 10 +-
mm/internal.h | 2 +-
14 files changed, 22 insertions(+), 22 deletions(-)
roperly named
With "gup_fast()", we now even have a function that is referred to in
comment in mm/mmu_gather.c.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Mike Rapoport (IBM)
Signed-off-by: David Hildenbrand
---
mm/gup.c | 205 ---
1 file changed, 103 insertions(+), 102 deletions(-)
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
On 2/16/24 08:56, Catalin Marinas wrote:
...
The problem is that the contpte_* symbols are called from the ptep_* inline
functions. So where those inlines are called from modules, we need to make sure
the contpte_* symbols are available.
John Hubbard originally reported this problem against v1
picture of the preferred ways to do arch overrides.
Thanks for taking the time to look into it, and also to explain it.
Much appreciated!
thanks,
--
John Hubbard
NVIDIA
ak
can have unintended link defects. Avoid using them.
...which seems deeply out of touch with how arch layers work these days,
doesn't it? (This is not rhetorical; I'm asking in order to get an
opinion or two on the topic.)
thanks,
--
John Hubbard
NVIDIA
include/linux/mm.h | 27 ---
mm/gup.c | 10 +-
mm/huge_memory.c | 2 +-
mm/hugetlb.c | 7 ---
4 files changed, 34 insertions(+), 12 deletions(-)
Looks good,
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
diff -
some point, we're going to make this all work with
file-backed memory, which will *definitely* not be discardable--I
realize that we're not there yet, of course.
But here, it's reasonable to commit to just retrying indefinitely,
really. Memory should eventually show up. And if it doesn't, then
restarting the machine is better than corrupting data, generally.
thanks,
--
John Hubbard
NVIDIA
On 9/22/22 19:26, John Hubbard wrote:
>
> Reviewed-by: John Hubbard
>
I forgot to mention that I had applied your fix to Akira's
issue, before reviewing. So that fix works and builds and
looks nice too.
thanks,
--
John Hubbard
NVIDIA
to crash.
> +
> +Use BUILD_BUG_ON() for compile-time assertions
> +**
> +
> +The use of BUILD_BUG_ON() is acceptable and encouraged, because it is a
> +compile-time assertion that has no effect at runtime.
> +
> Appendix I) References
> --
>
I like the wording, it feels familiar somehow! :)
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
the original suggestion but it's not a big deal either way.
Yes, stronger wording is better. So how about this:
"Do not crash the kernel unless it is absolutely unavoidable--use
WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants\n"
. $herecurr);
thanks,
--
John Hubbard
NVIDIA
not crash the kernel unless it is
> unavoidable - use WARN_ON_ONCE & recovery code (if reasonable) rather than
> BUG() or variants.\n" . $herecurr);
Here's a requested tweak, to clean up the output and fix punctuation:
"Avoid crashing the kernel--use WARN_ON_ONCE() plus recovery code (if feasible)
instead of BUG() or variants.\n" . $herecurr);
thanks,
--
John Hubbard
NVIDIA
ent.
* Moved the comment right before gup_pte_range() instead of in the
body of the function, per John.
* Added patch 2/2 per Aneesh.
mm/gup.c| 34 --
mm/khugepaged.c | 10 ++
2 files changed, 34 insertions(+), 10 deletions(-)
Loo
er fix the test or drop it if we think it's no longer possible to
hit.
Oh no no no, please. This is not how to do tests. If you want a TODO
list somewhere, there are other ways. But tests that require maintenance
when you change something are an anti-pattern.
thanks,
--
John Hubbard
NVIDIA
_sys_to_dev(self->fd, buffer, npages));
Are you really sure that you want to assert on that? Because doing so
guarantees a test failure if and when we every upgrade the kernel to
be able to migrate swap-backed pages. And I seem to recall that this
current inability to migrate swap-backed pages is considered a flaw
to be fixed, right?
> +
> + ASSERT_FALSE(write_cgroup_param(cgroup, "memory.reclaim", 1UL<<30));
> +
> + /* Check we still see the updated data after restoring from swap. */
> + for (i = 0, ptr = buffer->ptr; i < size / sizeof(*ptr); ++i)
> + ASSERT_EQ(ptr[i], i);
> +
> + hmm_buffer_free(buffer);
> + destroy_cgroup();
> +}
> +
> /*
> * Read anonymous memory multiple times.
> */
thanks,
--
John Hubbard
NVIDIA
ds like a clumsy
API design to *disable*, right?). And there is no hint about the scope.
And it *could* be so much more readable like this:
dev_access_enable(DEV_ACCESS_THIS_THREAD);
thanks,
--
John Hubbard
NVIDIA
X1
Cc: # 5.2+
Fixes: 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast code")
Reviewed-by: Gerald Schaefer
Reviewed-by: Alexander Gordeev
Signed-off-by: Vasily Gorbik
---
Looks cleaner than I'd dared hope for. :)
Reviewed-by: John Hubbard
thanks,
--
John H
On 9/10/20 3:11 PM, Jason Gunthorpe wrote:
On Thu, Sep 10, 2020 at 02:22:37PM -0700, John Hubbard wrote:
Or am I way off here, and it really is possible (aside from the current
s390 situation) to observe something that "is no longer a page table"?
Yes, that is the issue. Remember t
at their
contents are unstable. Even if pXd_none()==true.
Or am I way off here, and it really is possible (aside from the current
s390 situation) to observe something that "is no longer a page table"?
thanks,
--
John Hubbard
NVIDIA
any existing functionality of the API.
All the callers are changed to pass FOLL_WRITE.
This looks good. A few nits below, but with those fixed, feel free to
add:
Reviewed-by: John Hubbard
There are few places where 1 is passed to 2nd parameter of
__get_user_pages_fast() and return value is
building up, but that's merely an indication of the wide usage of this
functionality. So it all feels about right.
thanks,
--
John Hubbard
NVIDIA
t;> ret = nr;
>> }
>>
>
> Just noticed IRQS_ENABLED is not available on other archs than ppc64.
> I will fix this for v7.
>
What's the fix going to look like, approximately?
thanks,
--
John Hubbard
NVIDIA
On 1/16/20 1:37 AM, Christoph Hellwig wrote:
On Wed, Jan 15, 2020 at 01:19:41PM -0800, John Hubbard wrote:
On 1/15/20 7:23 AM, Christoph Hellwig wrote:
...
I'm really not sold on this scheme. Note that I think it is
particularly bad, but it also doesn't seem any better than w
On 1/15/20 7:30 AM, Christoph Hellwig wrote:
> On Tue, Jan 07, 2020 at 02:45:47PM -0800, John Hubbard wrote:
>> Introduce pin_user_pages*() variations of get_user_pages*() calls,
>> and also pin_longterm_pages*() variations.
>>
>> For now, these are placeholder calls, u
ge, GUP_PIN_COUNTING_BIAS))
+ __put_page(page);
+
+ __update_proc_vmstat(page, NR_FOLL_PIN_RETURNED, 1);
+}
+EXPORT_SYMBOL(unpin_user_page);
[1] https://lore.kernel.org/r/20191216222537.491123-24-jhubb...@nvidia.com
[PATCH v11 23/25] mm/gup: track FOLL_PIN pages
thanks,
--
John Hubbard
NVIDIA
On 1/9/20 2:07 PM, John Hubbard wrote:
> On 1/7/20 2:45 PM, John Hubbard wrote:
>> Hi,
>>
>> The "track FOLL_PIN pages" would have been the very next patch, but it is
>> not included here because I'm still debugging a bug report from Leon.
>> L
On 1/7/20 2:45 PM, John Hubbard wrote:
> Hi,
>
> The "track FOLL_PIN pages" would have been the very next patch, but it is
> not included here because I'm still debugging a bug report from Leon.
> Let's get all of the prerequisite work (it's been reviewed
: John Hubbard
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 562e3a1a1bf9..9f804cb25c61 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4815,7 +4815,7 @@ static int io_sqe_buffer_register(struct io_ring_ctx
*ctx, void
or
easier reading of process_vm_rw_single_vec().
Reviewed-by: Jan Kara
Reviewed-by: Jérôme Glisse
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/process_vm_access.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/mm/proc
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/infiniband/core/umem.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 7a3b99597ead..214e87aa609d 100644
--- a/drivers
timil Babka for explaining the 4 cases
in this documentation. (I've reworded it and expanded upon it.)
Reviewed-by: Jan Kara
Reviewed-by: Mike Rapoport # Documentation
Reviewed-by: Jérôme Glisse
Cc: Jonathan Corbet
Cc: Ira Weiny
Signed-off-by: John Hubbard
---
Documentatio
In order to provide a clearer, more symmetric API for pinning
and unpinning DMA pages. This way, pin_user_pages*() calls
match up with unpin_user_pages*() calls, and the API is a lot
closer to being self-explanatory.
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
Documentation/core-api
_FORCE to be set for get_user_pages_fast().
Fixes: 817be129e6f2 ("mm: validate get_user_pages_fast flags")
Cc: Christoph Hellwig
Reviewed-by: Leon Romanovsky
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
mm/gup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
di
Dan Williams
Cc: Jerome Glisse
Signed-off-by: John Hubbard
---
mm/gup.c | 174 +--
1 file changed, 92 insertions(+), 82 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index 5938e29a5a8b..b61bd5c469ae 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -
ned-off-by: John Hubbard
---
drivers/infiniband/core/umem.c | 2 +-
drivers/infiniband/core/umem_odp.c | 13 ++---
drivers/infiniband/hw/hfi1/user_pages.c | 2 +-
drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +-
drivers/infiniband/hw/qib/qib_user_pag
convert from the get_user_pages()/put_page() model, to the
pin_user_pages()/put_user_page() model, the only change required
here is to change get_user_pages() to pin_user_pages().
Acked-by: Björn Töpel
Signed-off-by: John Hubbard
---
net/xdp/xdp_umem.c | 2 +-
1 file changed, 1 insertion(+), 1
1. Change v4l2 from get_user_pages() to pin_user_pages().
2. Because all FOLL_PIN-acquired pages must be released via
put_user_page(), also convert the put_page() call over to
put_user_pages_dirty_lock().
Acked-by: Hans Verkuil
Cc: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/media/v4l2
's no need for it at the VFIO call site.
So remove it.
Tested-by: Alex Williamson
Acked-by: Alex Williamson
Reviewed-by: Jason Gunthorpe
Reviewed-by: Ira Weiny
Suggested-by: Jason Gunthorpe
Cc: Dan Williams
Cc: Jerome Glisse
Signed-off-by: John Hubbard
---
drivers/vfi
Kara
Signed-off-by: Ira Weiny
Signed-off-by: John Hubbard
---
include/linux/mm.h | 18 +-
mm/memremap.c | 15 +--
mm/swap.c | 27 ++-
3 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/include/linux/mm.h b/incl
e the successful
end of each routine, to increment *nr.
Reviewed-by: Christoph Hellwig
Reviewed-by: Jérôme Glisse
Reviewed-by: Jan Kara
Cc: Kirill A. Shutemov
Cc: Ira Weiny
Cc: Christoph Hellwig
Cc: Aneesh Kumar K.V
Signed-off-by: John Hubbard
---
mm/gup.c
p is only needed in the MEMORY_DEVICE_FSDAX case, but it
does no harm in the MEMORY_DEVICE_DEVDAX and MEMORY_DEVICE_PCI_P2PDMA
case.
Reviewed-by: Christoph Hellwig
Reviewed-by: Jérôme Glisse
Cc: Jan Kara
Cc: Ira Weiny
Signed-off-by: Dan Williams
Signed-off-by: John Hubbard
---
drivers/nvdimm/pm
instead of here, so just delete the
local release_user_pages() entirely, and call
put_user_pages_dirty_lock() directly, instead.
[1] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Reviewed-by: Jan Kara
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/platform/goldfish/goldf
lling set_page_dirty_lock() if the CPU pages
were potentially receiving data from the device.
Reviewed-by: Christoph Hellwig
Acked-by: Hans Verkuil
Cc: Mauro Carvalho Chehab
Cc:
Signed-off-by: John Hubbard
---
drivers/media/v4l2-core/videobuf-dma-sg.c | 5 -
1 file changed, 4 insertions(+), 1 del
An upcoming patch uses try_get_compound_head() more widely,
so move it to the top of gup.c.
Also fix a tiny spelling error and a checkpatch.pl warning.
Reviewed-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/gup.c | 29
1. Convert from get_user_pages() to pin_user_pages().
2. As required by pin_user_pages(), release these pages via
put_user_page().
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
arch/powerpc/mm/book3s64/iommu_api.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff
[1]
[1] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Tested-by: Alex Williamson
Acked-by: Alex Williamson
Signed-off-by: John Hubbard
---
drivers/vfio/vfio_iommu_type1.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/v
: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/gpu/drm/via/via_dmablit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/via/via_dmablit.c
b/drivers/gpu/drm/via/via_dmablit.c
index 3db000aacd26..37c5e572993a 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
t;gup_flags & 1"
phrases in the function calls.
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/gup_benchmark.c | 9 ++---
tools/testing/selftests/vm/gup_benchmark.c | 6 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a
1. Avoid naming conflicts: rename local static function from
"pin_user_pages()" to "goldfish_pin_pages()".
An upcoming patch will introduce a global pin_user_pages()
function.
Reviewed-by: Jan Kara
Reviewed-by: Jérôme Glisse
Reviewed-by: Ira Weiny
Signed-off-by: John H
:
https://lwn.net/Articles/774411/
[3] The trouble with get_user_pages() (Apr 30, 2018):
https://lwn.net/Articles/753027/
Dan Williams (1):
mm: Cleanup __put_devmap_managed_page() vs ->page_free()
John Hubbard (21):
mm/gup: factor out duplicate code from four routines
mm/gup: move try_ge
se cycle, so I'm probably
going to
submit the prerequisite patches (patches 1-10, or more boldly, 1-22), for
candidates
for 5.6.
thanks,
--
John Hubbard
NVIDIA
On 12/27/19 1:56 PM, John Hubbard wrote:
...
>> It is ancient verification test (~10y) which is not an easy task to
>> make it understandable and standalone :).
>>
>
> Is this the only test that fails, btw? No other test failures or hints of
> problems?
>
> (Also
be attempted independently of (1), in
order to see if it ends up hiding the repro.
I've updated this branch to implement (1), but not (2), hoping you can give
this one a spin?
g...@github.com:johnhubbard/linux.git
pin_user_pages_tracking_v11_with_diags
thanks,
--
John Hubbard
NVI
On 12/22/19 5:23 AM, Leon Romanovsky wrote:
On Fri, Dec 20, 2019 at 03:54:55PM -0800, John Hubbard wrote:
On 12/20/19 10:29 AM, Leon Romanovsky wrote:
...
$ ./build.sh
$ build/bin/run_tests.py
If you get things that far I think Leon can get a reproduction for you
I'm not so optimistic
On 12/21/19 2:08 AM, Leon Romanovsky wrote:
On Fri, Dec 20, 2019 at 03:54:55PM -0800, John Hubbard wrote:
On 12/20/19 10:29 AM, Leon Romanovsky wrote:
...
$ ./build.sh
$ build/bin/run_tests.py
If you get things that far I think Leon can get a reproduction for you
I'm not so optimistic
On 12/20/19 4:51 PM, Dan Williams wrote:
> On Fri, Dec 20, 2019 at 4:41 PM John Hubbard wrote:
>>
>> On 12/20/19 4:33 PM, Dan Williams wrote:
>> ...
>>>> I believe there might be also a different solution for this: For
>>>> transparent huge pages,
sy is it for mere mortals outside of Intel, to set up a DAX (nvdimm?)
test setup? I'd hate to go into this without having that coverage up
and running. It's been sketchy enough as it is. :)
thanks,
--
John Hubbard
NVIDIA
rting to think that I should just post the first 9 or so
prerequisite patches (first 9 patches, plus the v4l2 fix that arguably should
have been earlier in the sequence I guess), as 5.6 candidates, while I go
back to the drawing board here.
thanks,
--
John Hubbard
NVIDIA
npin_user_page(struct page *page);
void unpin_user_pages_dirty_lock(struct page **pages, unsigned long npages,
If that fails to repro, then we would be zeroing in on the root cause.
The branch is here (I just tested it and it seems healthy):
g...@github.com:johnhubbard/linux.git pin_user_pages_tracking_v11_with_diags
thanks,
--
John Hubbard
NVIDIA
27;m very curious how did you get this assert "d.speed_to_str" covers all
> known speeds according to the IBTA.
>
Hi Leon,
Short answer: I can make that one pass, with a small fix the the rdma-core test
suite:
commit a1b9fb0846e1b2356d7a16f4fbdd1960cf8dcbe5 (HEAD -> fix_speed
_work/rdma-core/tests/test_device.py", line 113, in
verify_port_attr
assert 'Invalid' not in d.speed_to_str(attr.active_speed)
AssertionError
------
Ran 67 tests in 10.058s
FAILED (failures=1, skipped=3)
thanks,
--
John Hubbard
NVIDIA
On 12/19/19 1:07 PM, Jason Gunthorpe wrote:
On Thu, Dec 19, 2019 at 12:30:31PM -0800, John Hubbard wrote:
On 12/19/19 5:26 AM, Leon Romanovsky wrote:
On Mon, Dec 16, 2019 at 02:25:12PM -0800, John Hubbard wrote:
Hi,
This implements an API naming change (put_user_page*() -->
unpin_user_p
On 12/19/19 5:26 AM, Leon Romanovsky wrote:
On Mon, Dec 16, 2019 at 02:25:12PM -0800, John Hubbard wrote:
Hi,
This implements an API naming change (put_user_page*() -->
unpin_user_page*()), and also implements tracking of FOLL_PIN pages. It
extends that tracking to a few select subsyst
On 12/18/19 10:52 PM, Dan Williams wrote:
On Wed, Dec 18, 2019 at 9:51 PM John Hubbard wrote:
On 12/18/19 9:27 PM, Dan Williams wrote:
...
@@ -461,5 +449,5 @@ void __put_devmap_managed_page(struct page *page)
page->mapping = NULL;
page->pgmap->ops->pa
.glancing through the current callers, that doesn't look to be a problem.
Good. So it should be OK to do EXPORT_SYMBOL_GPL here.
Are you *sure* you don't want to just pre-emptively EXPORT now, and save
looking at it again?
thanks,
--
John Hubbard
NVIDIA
ra Weiny
Signed-off-by: John Hubbard
---
include/linux/mm.h | 18 +-
mm/memremap.c | 16 ++--
mm/swap.c | 27 ++-
3 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c97ea3
On 12/18/19 8:04 AM, Kirill A. Shutemov wrote:
On Mon, Dec 16, 2019 at 02:25:16PM -0800, John Hubbard wrote:
An upcoming patch changes and complicates the refcounting and
especially the "put page" aspects of it. In order to keep
everything clean, refactor the devmap page releas
On 12/18/19 7:52 AM, Kirill A. Shutemov wrote:
On Mon, Dec 16, 2019 at 02:25:13PM -0800, John Hubbard wrote:
+static void put_compound_head(struct page *page, int refs)
+{
+ /* Do a get_page() first, in case refs == page->_refcount */
+ get_page(page);
+ page_ref_sub(p
nking it would be cleaner to put in the
forward declaration, rather than moving code blocks, but either way seems
reasonable. I'll go ahead and move the code blocks and delete the forward
declaration, now that someone has weighed in in favor of that.
thanks,
--
John Hubbard
NVIDIA
t/Articles/753027/
Reviewed-by: Jan Kara
Suggested-by: Jan Kara
Suggested-by: Jérôme Glisse
Cc: Kirill A. Shutemov
Signed-off-by: John Hubbard
---
Hi,
The kbuild test robot noticed that try_pin_compound_head() can be
declared static, in mm/gup.c. This updated patch does that.
thanks,
John Hubb
page *page,
+ int refs)
{
struct page *head = try_get_compound_head(page,
GUP_PIN_COUNTING_BIAS * refs);
thanks,
--
John Hubbard
NVIDIA
s are fairly early in the run_vmtests script,
because with test suites, it's usually preferable to put the
shorter, faster tests first, all other things being equal.
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
tools/testing/selftests/vm/run_vmtests | 22 ++
1 fi
In order to provide a clearer, more symmetric API for pinning
and unpinning DMA pages. This way, pin_user_pages*() calls
match up with unpin_user_pages*() calls, and the API is a lot
closer to being self-explanatory.
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
Documentation/core-api
's no need for it at the VFIO call site.
So remove it.
Tested-by: Alex Williamson
Acked-by: Alex Williamson
Reviewed-by: Jason Gunthorpe
Reviewed-by: Ira Weiny
Suggested-by: Jason Gunthorpe
Cc: Dan Williams
Cc: Jerome Glisse
Signed-off-by: John Hubbard
---
drivers/vfi
ned-off-by: John Hubbard
---
drivers/infiniband/core/umem.c | 2 +-
drivers/infiniband/core/umem_odp.c | 13 ++---
drivers/infiniband/hw/hfi1/user_pages.c | 2 +-
drivers/infiniband/hw/mthca/mthca_memfree.c | 2 +-
drivers/infiniband/hw/qib/qib_user_pag
lling set_page_dirty_lock() if the CPU pages
were potentially receiving data from the device.
Reviewed-by: Christoph Hellwig
Acked-by: Hans Verkuil
Cc: Mauro Carvalho Chehab
Cc:
Signed-off-by: John Hubbard
---
drivers/media/v4l2-core/videobuf-dma-sg.c | 5 -
1 file changed, 4 insertions(+), 1 del
t;gup_flags & 1"
phrases in the function calls.
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/gup_benchmark.c | 9 ++---
tools/testing/selftests/vm/gup_benchmark.c | 6 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a
t/Articles/753027/
Reviewed-by: Jan Kara
Suggested-by: Jan Kara
Suggested-by: Jérôme Glisse
Cc: Kirill A. Shutemov
Signed-off-by: John Hubbard
---
Documentation/core-api/pin_user_pages.rst | 2 +-
include/linux/mm.h| 83 -
include/linux/mmzone.h
: John Hubbard
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 9b1833fedc5c..c6ff9cc7fe71 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4539,7 +4539,7 @@ static int io_sqe_buffer_register(struct io_ring_ctx
*ctx, void
1. Convert from get_user_pages() to pin_user_pages().
2. As required by pin_user_pages(), release these pages via
put_user_page().
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
arch/powerpc/mm/book3s64/iommu_api.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff
_FORCE to be set for get_user_pages_fast().
Fixes: 817be129e6f2 ("mm: validate get_user_pages_fast flags")
Cc: Christoph Hellwig
Reviewed-by: Leon Romanovsky
Reviewed-by: Jan Kara
Signed-off-by: John Hubbard
---
mm/gup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
di
convert from the get_user_pages()/put_page() model, to the
pin_user_pages()/put_user_page() model, the only change required
here is to change get_user_pages() to pin_user_pages().
Acked-by: Björn Töpel
Signed-off-by: John Hubbard
---
net/xdp/xdp_umem.c | 2 +-
1 file changed, 1 insertion(+), 1
timil Babka for explaining the 4 cases
in this documentation. (I've reworded it and expanded upon it.)
Reviewed-by: Jan Kara
Reviewed-by: Mike Rapoport # Documentation
Reviewed-by: Jérôme Glisse
Cc: Jonathan Corbet
Cc: Ira Weiny
Signed-off-by: John Hubbard
---
Documentatio
1. Avoid naming conflicts: rename local static function from
"pin_user_pages()" to "goldfish_pin_pages()".
An upcoming patch will introduce a global pin_user_pages()
function.
Reviewed-by: Jan Kara
Reviewed-by: Jérôme Glisse
Reviewed-by: Ira Weiny
Signed-off-by: John H
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/infiniband/core/umem.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 7a3b99597ead..214e87aa609d 100644
--- a/drivers
wed-by: Dan Williams
Reviewed-by: Jan Kara
Signed-off-by: Ira Weiny
Signed-off-by: John Hubbard
---
include/linux/mm.h | 17 +
mm/memremap.c | 16 ++--
mm/swap.c | 24
3 files changed, 39 insertions(+), 18 deletions(-)
diff -
[1]
[1] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Tested-by: Alex Williamson
Acked-by: Alex Williamson
Signed-off-by: John Hubbard
---
drivers/vfio/vfio_iommu_type1.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/v
1. Change v4l2 from get_user_pages() to pin_user_pages().
2. Because all FOLL_PIN-acquired pages must be released via
put_user_page(), also convert the put_page() call over to
put_user_pages_dirty_lock().
Acked-by: Hans Verkuil
Cc: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/media/v4l2
_user_pages(),
check each page: if page_dma_pinned() returns false, then
WARN and return.
Do this outside of the benchmark timestamps, so that it doesn't
affect reported times.
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/gup_benchmark.c | 65 +++
r_pages() (LPC: Dec 12, 2018):
https://lwn.net/Articles/774411/
[3] The trouble with get_user_pages() (Apr 30, 2018):
https://lwn.net/Articles/753027/
Dan Williams (1):
mm: Cleanup __put_devmap_managed_page() vs ->page_free()
John Hubbard (24):
mm/gup: factor out duplicate code from four rout
e the successful
end of each routine, to increment *nr.
Reviewed-by: Christoph Hellwig
Reviewed-by: Jérôme Glisse
Reviewed-by: Jan Kara
Cc: Ira Weiny
Cc: Christoph Hellwig
Cc: Aneesh Kumar K.V
Signed-off-by: John Hubbard
---
mm/gup.c | 91 ++
Thanks to Jason Gunthorpe for pointing out a clean way to fix this,
and to Dan Williams for helping clarify the DAX refactoring.
Tested-by: Alex Williamson
Acked-by: Alex Williamson
Reviewed-by: Jason Gunthorpe
Reviewed-by: Ira Weiny
Suggested-by: Jason Gunthorpe
Cc: Dan Williams
Cc: Jerome Gl
or
easier reading of process_vm_rw_single_vec().
Reviewed-by: Jan Kara
Reviewed-by: Jérôme Glisse
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
mm/process_vm_access.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/mm/proc
: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/gpu/drm/via/via_dmablit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/via/via_dmablit.c
b/drivers/gpu/drm/via/via_dmablit.c
index 3db000aacd26..37c5e572993a 100644
--- a/drivers/gpu/drm/via/via_dmablit.c
instead of here, so just delete the
local release_user_pages() entirely, and call
put_user_pages_dirty_lock() directly, instead.
[1] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Reviewed-by: Jan Kara
Reviewed-by: Ira Weiny
Signed-off-by: John Hubbard
---
drivers/platform/goldfish/goldf
p is only needed in the MEMORY_DEVICE_FSDAX case, but it
does no harm in the MEMORY_DEVICE_DEVDAX and MEMORY_DEVICE_PCI_P2PDMA
case.
Reviewed-by: Christoph Hellwig
Reviewed-by: Jérôme Glisse
Cc: Jan Kara
Cc: Ira Weiny
Signed-off-by: Dan Williams
Signed-off-by: John Hubbard
---
drivers/nvdimm/pm
1 - 100 of 491 matches
Mail list logo