ps://lore.kernel.org/r/20200527194953.11130-1-jhubb...@nvidia.com
[2] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz
John Hubbard (2):
docs: mm/gup: pin_user_pages.rst: add a "case 5"
vhost: convert get_user_pages() --> pin_user_pages()
Documentation
unpin" case.
Add a fifth case, to help explain that there is a general pattern
that requires pin_user_pages*() API calls.
Cc: Vlastimil Babka
Cc: Jan Kara
Cc: Jérôme Glisse
Cc: Dave Chinner
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Cc: linux-fsde...@vger.kernel.org
Signed-of
age_dirty_lock()
+put_page()
+
I'll send a v2 shortly.
thanks,
--
John Hubbard
NVIDIA
lock(). See below.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
---
Hi,
I'm compile tested this, but unable to run-time test, so any testing
he
c: David Hildenbrand
Signed-off-by: John Hubbard
---
mm/frame_vector.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/frame_vector.c b/mm/frame_vector.c
index c431ca81dad5..4107dbca0056 100644
--- a/mm/frame_vector.c
+++ b/mm/frame_vector.c
@@ -72,7 +72,7 @@ int get_v
add that as part of this.
Cc: Souptick Joarder
Reviewed-by: David Hildenbrand
Acked-by: Pankaj Gupta
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 36
2 files changed, 38 insertions(+)
diff --git a/include/linux/mm.h b
Hi,
Changes since v1:
* added an assert-and-return to the corresponding
get_user_pages_locked() call, to keep out any externally set FOLL_PIN flag,
thanks to Souptick Joarder's review for spotting that.
* Added Acked-by and Reviewed by tags from David and Pakaj
John Hubbard (2):
mm/gup
in the
get_user_pages*() call, so add that as part of this.
Cc: Souptick Joarder
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 23 +++
2 files changed, 25 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f3fe7371855c
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
dr
-by.
I've run this patchset through non-destructive xfstests, and a few
other things such as LTP. However, I'm not set up for IVTV specific
testing.
[1] https://lore.kernel.org/r/d11d52f8-d54c-bb45-bde9-198235a03...@nvidia.com
John Hubbard (2):
mm/gup: introduce pin_user_pages_unlocked
ivtv
, as part of
commit 434502754f2 ("[PATCH] SH Merge")
...and that commit created the minor bug that patch 0001 here
addresses. (+Cc Paul just for the sake of completeness.)
[1] git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
thanks,
--
John Hubbard
NVIDIA
On 2020-05-31 13:58, Sam Ravnborg wrote:
...
Thanks, patches are now applied to drm-misc-next.
They will hit -next soon, but you will have to wait
until next (not the upcoming) merge window before they hit
mainline linux.
Sam
Great! That will work out just fine.
thanks,
--
John
On 2020-05-31 00:13, Souptick Joarder wrote:
On Sun, May 31, 2020 at 12:34 PM Souptick Joarder wrote:
On Thu, May 28, 2020 at 4:02 AM John Hubbard wrote:
Introduce pin_user_pages_locked(), which is nearly identical to
get_user_pages_locked() except that it sets FOLL_PIN and rejects
thanks,
--
John Hubbard
NVIDIA
On 2020-05-22 20:59, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 1" scenario
(Direct IO), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.
The
: Michael S. Tsirkin
Cc: Jason Wang
Cc: k...@vger.kernel.org
Cc: virtualizat...@lists.linux-foundation.org
Cc: net...@vger.kernel.org
Signed-off-by: John Hubbard
---
drivers/vhost/vhost.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers
unpin" case.
Add a fifth case, to help explain that there is a general pattern
that requires pin_user_pages*() API calls.
Cc: Vlastimil Babka
Cc: Jan Kara
Cc: Jérôme Glisse
Cc: Dave Chinner
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Cc: linux-fsde...@vger.kernel.org
Signed-of
include cross-compiling for a few other arches. Any run-time
testing would be greatly appreciated.
[1] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz
John Hubbard (2):
docs: mm/gup: pin_user_pages.rst: add a "case 5"
vhost: convert get_user_pages() --> p
be a "nice to have", though, if anyone were able to do a
performance comparison on the gasket driver for this patch, and/or
basic runtime verification, since I'm sure it's a specialized setup.
thanks,
--
John Hubbard
NVIDIA
On 2020-05-29 01:29, Dragan Cvetic wrote:
Hi John,
Thank you for the suggestion, please find my comment below:
-Original Message-
From: John Hubbard
Sent: Wednesday 27 May 2020 02:26
To: LKML
Cc: Souptick Joarder ; John Hubbard ;
Derek Kiernan ; Dragan
Cvetic ; Arnd Bergmann ; Greg
guidance. So let's just write it once,
there.
[1] https://lore.kernel.org/r/20200529074658.GM30374@kadam
Cc: Dan Carpenter
Cc: Jan Kara
Cc: Vlastimil Babka
Signed-off-by: John Hubbard
---
Hi,
This applies on top of linux-next, in order to avoid a conflict with
Mauro Carvalho Chehab's fix
internal_get_user_pages_fast(start, nr_pages,
gup_flags, pages);
2891 }
2892 EXPORT_SYMBOL_GPL(pin_user_pages_fast);
regards,
dan carpenter
thanks,
--
John Hubbard
NVIDIA
hes so
far, but that sure doesn't mean it's perfect! :)
Maybe adding the words that Dan suggests, above, will suffice? Here:
>>> "In 2019 we introduced pin_user_pages() and now we are converting
>>> get_user_pages() to the new API as appropriate".
thanks,
--
John Hubbard
NVIDIA
.)
There were no *case 5* in the other patch posted in -mm. Do we need to add it ?
Working on figuring that out [1], but it's not directly relevant to this thread.
Maybe I shouldn't have brought it up here. :)
[1] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz
thanks,
John Hubbard
me helpful background in [2]: basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
gup call sites
converted--with the notable exception of the bio/block layer.
[1] https://lore.kernel.org/r/20200518012157.1178336-2-jhubb...@nvidia.com
John Hubbard (2):
mm/gup: introduce pin_user_pages_locked()
mm/gup: frame_vector: convert get_user_pages() --> pin_user_pages()
incl
Introduce pin_user_pages_locked(), which is nearly identical to
get_user_pages_locked() except that it sets FOLL_PIN and rejects
FOLL_GET.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 30 ++
2 files changed, 32 insertions(+)
diff
: linux-...@vger.kernel.org
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: John Hubbard
---
Documentation/core-api/pin_user_pages.rst | 33 +--
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/Documentation/core-api/pin_user_pages.rst
b/Documentation/core-api
On 2020-05-27 01:51, Daniel Vetter wrote:
On Wed, May 27, 2020 at 10:48:52AM +0200, Daniel Vetter wrote:
On Tue, May 26, 2020 at 03:57:45PM -0700, John Hubbard wrote:
On 2020-05-26 14:00, Souptick Joarder wrote:
This code was using get_user_pages(), in a "Case 2" scenario
(DMA/RD
. Any run-time
testing would be greatly appreciated!
Cc: Derek Kiernan
Cc: Dragan Cvetic
Cc: Arnd Bergmann
Cc: Greg Kroah-Hartman
Cc: Michal Simek
Cc: linux-arm-ker...@lists.infradead.org
John Hubbard (3):
misc: xilinx-sdfec: improve get_user_pages_fast() error handling
misc: xilinx-sdfec
radead.org
Signed-off-by: John Hubbard
---
drivers/misc/xilinx_sdfec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index e2766aad9e14..7e2ee3e547f2 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xili
c: Dragan Cvetic
Cc: Arnd Bergmann
Cc: Greg Kroah-Hartman
Cc: Michal Simek
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: John Hubbard
---
drivers/misc/xilinx_sdfec.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/
most other call
sites.
Fixes: 20ec628e8007e ("misc: xilinx_sdfec: Add ability to configure LDPC")
Cc: Derek Kiernan
Cc: Dragan Cvetic
Cc: Arnd Bergmann
Cc: Greg Kroah-Hartman
Cc: Michal Simek
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: John Hubbard
---
drivers/misc
anks,
John Hubbard
NVIDIA
On 2020-05-26 11:27, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 1" scenario
(Direct IO), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpi
/807108/
Signed-off-by: Souptick Joarder
Cc: John Hubbard
Hi,
I'm compile tested this, but unable to run-time test, so any testing
help is much appriciated.
---
drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/ra
tuations (Case 4, in
Documentation/core-api/pin_user_pages.rst: struct page manipulation) in
which it operates on single pages. Those will remain get_user_pages*()
calls, or perhaps change to get_user_page().
thanks,
--
John Hubbard
NVIDIA
Petersen
Cc: linux-s...@vger.kernel.org
Signed-off-by: John Hubbard
---
Hi,
As mentioned in the v1 review thread, we probably still want/need
this. Or so I claim. :) Please see what you think...
Changes since v1: changed the commit log, to refer to Direct IO
(Case 1), instead of DMA/RDMA (C
On 2020-05-22 01:32, "Kai Mäkisara (Kolumbus)" wrote:
On 21. May 2020, at 22.47, Bart Van Assche wrote:
On 2020-05-18 21:55, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that
IN")
Signed-off-by: Vitaly Kuznetsov
---
include/linux/mm.h | 4 ++--
mm/gup.c | 18 +-
2 files changed, 11 insertions(+), 11 deletions(-)
Hi Vitaly,
Thanks for the fix,
Reviewed-by: John Hubbard
(+CC Souptick, who fixed a similar set of links, maybe in a
returning */
#define FOLL_PIN 0x4 /* pages must be released via unpin_user_page */
+#define FOLL_KVM 0x8 /* access to VM_KVM_PROTECTED VMAs */
I grabbed 0x8 already, for FOLL_FAST_ONLY. :)
thanks,
--
John Hubbard
NVIDIA
Cc: Thomas Gleixner
Cc: Paolo Bonzini
Cc: Sean Christopherson
Cc: Vitaly Kuznetsov
Cc: Wanpeng Li
Cc: Jim Mattson
Cc: Joerg Roedel
Cc: H. Peter Anvin
Cc: x...@kernel.org
Cc: k...@vger.kernel.org
Signed-off-by: John Hubbard
---
arch/x86/kvm/svm/sev.c | 6 +++---
1 file changed, 3 insert
: Ingo Molnar
Cc: Borislav Petkov
Cc: Thomas Gleixner
Cc: Paolo Bonzini
Cc: Sean Christopherson
Cc: Vitaly Kuznetsov
Cc: Wanpeng Li
Cc: Jim Mattson
Cc: Joerg Roedel
Cc: H. Peter Anvin
Cc: x...@kernel.org
Cc: k...@vger.kernel.org
John Hubbard (2):
KVM: SVM: fix svn_pin_memory()'s use
Cc: Jim Mattson
Cc: Joerg Roedel
Cc: H. Peter Anvin
Cc: x...@kernel.org
Cc: k...@vger.kernel.org
Signed-off-by: John Hubbard
---
arch/x86/kvm/svm/sev.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 89f7f3aebd31.
opriate in mm.h, yes.
thanks,
--
John Hubbard
NVIDIA
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
H
umit Semwal
Cc: tee-...@lists.linaro.org
Cc: linux-me...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: John Hubbard
---
Hi,
This fixes the typo ("convert convert") in the subject line, but
otherwise no changes.
thanks,
John Hubbard
NVIDIA
: Moritz Fischer
Cc: linux-f...@vger.kernel.org
Signed-off-by: John Hubbard
---
Hi,
This is the same logical change as in v2, but it is applied to
char-misc-next, in order to avoid a merge problem with Souptick's
commit c9d7e3da1f3c ("fpga: dfl: afu: Corrected error handling levels "
pages() on a swapped out page, another guest can be scheduled while
+ * waiting for IO to swap in guest A's page.
*/
#define FAULT_FLAG_WRITE 0x01
#define FAULT_FLAG_MKWRITE 0x02
thanks,
--
John Hubbard
NVIDIA
good. And in fact, Andrew has the same fix-up in the mmotm branch of
linux-next.git, as
commit a76c281a8ddd ("mmap-locking-api-rename-mmap_sem-to-mmap_lock-fix").
thanks,
--
John Hubbard
NVIDIA
suggestion?
I'll send you a v2, rebased on top of the latest char-misc.git, no problem.
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
On 2020-05-23 02:41, Chris Wilson wrote:
Quoting John Hubbard (2020-05-22 06:19:27)
The purpose of posting this series is to launch a test in the
intel-gfx-ci tree. (The patches have already been merged into Andrew's
linux-mm tree.)
This applies to today's linux.git (note the base-commit tag
On 2020-05-23 13:57, Moritz Fischer wrote:
On Fri, May 22, 2020 at 06:52:34PM -0700, John Hubbard wrote:
On 2020-05-19 13:14, John Hubbard wrote:
This code was using get_user_pages_fast(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that
Brandenburg
Cc: de...@lists.orangefs.org
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: John Hubbard
---
Hi,
Note that I have only compile-tested this patch, although that does
also include cross-compiling for a few other arches.
Changes since v1 [3]: correct the commit description, so that
it refers
On 2020-05-19 13:14, John Hubbard wrote:
This code was using get_user_pages_fast(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages_fast() + put_page() calls to
pin_user_pages_fast() + unpin_user_pag
Cornelia Huck
Cc: k...@vger.kernel.org
Signed-off-by: John Hubbard
---
Hi,
I'm compile-tested this, but am not able to run-time test, so any
testing help is much appreciated!
thanks,
John Hubbard
NVIDIA
drivers/vfio/vfio_iommu_spapr_tce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
on
the latest linux-next (which has my changes now). Should be fine. And in
fact it would be nice to get that done in this round, so that the pin* and
get* APIs look the same.
thanks,
--
John Hubbard
NVIDIA
to change the name as well, to whatever the consensus
is. My initial recommendation is: get_user_pages_fast_only(), to
match the new pin_user_pages_only().
John Hubbard (4):
mm/gup: move __get_user_pages_fast() down a few lines in gup.c
mm/gup: refactor and de-duplicate gup_fast() code
mm
This is in order to avoid a forward declaration of
internal_get_user_pages_fast(), in the next patch.
This is code movement only--all generated code should
be identical.
Signed-off-by: John Hubbard
---
mm/gup.c | 112 +++
1 file changed, 56
f enabling interrupts was fragile at best.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 1 +
mm/gup.c | 63 ++
2 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a5
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
driv
This is the FOLL_PIN equivalent of __get_user_pages_fast(),
except with a more descriptive name, and gup_flags instead of
a boolean "write" in the argument list.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 36 +++
get one. And explain this with comments, seeing as
how it is error-prone.
Cc: Bartlomiej Zolnierkiewicz
Cc: Arnd Bergmann
Cc: Daniel Vetter
Cc: Gustavo A. R. Silva
Cc: Jani Nikula
Cc: dri-de...@lists.freedesktop.org
Cc: linux-fb...@vger.kernel.org
Signed-off-by: John Hubbard
---
drivers/video
Vetter
Cc: Gustavo A. R. Silva
Cc: Jani Nikula
Cc: dri-de...@lists.freedesktop.org
Cc: linux-fb...@vger.kernel.org
John Hubbard (2):
video: fbdev: fix error handling for get_user_pages_fast()
video: fbdev: convert get_user_pages() --> pin_user_pages()
drivers/video/fbdev/
Bergmann
Cc: Daniel Vetter
Cc: Gustavo A. R. Silva
Cc: Jani Nikula
Cc: dri-de...@lists.freedesktop.org
Cc: linux-fb...@vger.kernel.org
Signed-off-by: John Hubbard
---
drivers/video/fbdev/pvr2fb.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/pvr2
On 2020-05-21 19:46, Chris Wilson wrote:
Quoting John Hubbard (2020-05-22 00:38:41)
Include FOLL_FAST_ONLY in the list of flags to *not* WARN()
on, in internal_get_user_pages_fast().
Cc: Chris Wilson
Cc: Daniel Vetter
Cc: David Airlie
Cc: Jani Nikula
Cc: "Joonas Lahtinen"
Cc: Ma
Lespinasse
Cc: Jason Gunthorpe
Signed-off-by: John Hubbard
---
Hi Andrew,
This applies on top of [1], which in turn applies to
today's (20200521) linux-next.
As noted in the discussion [2], this will need changing from
mmap_sem to mmap_lock, after Michel Lespinasse's patchset
arrives.
[1
ko Ursulin
Signed-off-by: John Hubbard
---
Hi Andrew, Chris,
Andrew: This is a fixup that applies to today's (20200521) linux-next.
In that tree, this fixes up:
commit dfb8dfe80808 ("mm/gup: refactor and de-duplicate gup_fast() code")
Chris: I'd like to request another CI run for the
On 2020-05-21 12:11, John Hubbard wrote:
On 2020-05-21 11:57, Chris Wilson wrote:
Quoting John Hubbard (2020-05-19 01:21:20)
This needs to go through Andrew's -mm tree, due to adding a new gup.c
routine. However, I would really love to have some testing from the
drm/i915 folks, because I
On 2020-05-21 12:47, Bart Van Assche wrote:
On 2020-05-18 21:55, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_
On 2020-05-21 11:57, Chris Wilson wrote:
Quoting John Hubbard (2020-05-19 01:21:20)
This needs to go through Andrew's -mm tree, due to adding a new gup.c
routine. However, I would really love to have some testing from the
drm/i915 folks, because I haven't been able to run-time test that part
;)
Cc: David S. Miller
Cc: Jakub Kicinski
Cc: net...@vger.kernel.org
Cc: linux-r...@vger.kernel.org
Cc: rds-de...@oss.oracle.com
Signed-off-by: John Hubbard
---
net/rds/info.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/rds/info.c b/net/rds/info.c
index
patchset, but it doesn't seem
worth doing if we know this will conflict with your changes.
Sure, that's no problem. Although it looks like my changes may land
in mmotm first, and then your patchset, so maybe the right move is to
make this change *after* both of those things happen, yes?
thanks,
--
John Hubbard
NVIDIA
.
Not worth worrying about, but I do recall a few recent code reviews that
all preferred the multi-line version, which is why I suggested it.
Anyway, either way, with the thp_pmd_migration_success() name change, you
can add:
Reviewed-by: John Hubbard
thanks,
--
John Hubbard
NVIDIA
: Moritz Fischer
Cc: linux-f...@vger.kernel.org
Signed-off-by: John Hubbard
---
Hi,
Changes since v1:
Changed the label from "put_pages", to "unpin_pages".
thanks,
John Hubbard
NVIDIA
drivers/fpga/dfl-afu-dma-region.c | 19 +--
1 file changed, 5 in
On 2020-05-18 21:55, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.
Lo
On 2020-05-18 22:18, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.
Lo
etnaviv list can do some run time testing on the whole lot.
[1] https://lore.kernel.org/r/20200519002124.2025955-3-jhubb...@nvidia.com
[2] https://lore.kernel.org/r/20200518054315.2407093-1-jhubb...@nvidia.com
thanks,
--
John Hubbard
NVIDIA
On 2020-05-19 08:10, Xu Yilun wrote:
...
@@ -72,7 +63,7 @@ static int afu_dma_pin_pages(struct dfl_feature_platform_data
*pdata,
return 0;
put_pages:
How about we also change the tag to "unpin_pages"?
Others look good to me.
Sure, I'll send a v2 with that.
thank
umit Semwal
Cc: tee-...@lists.linaro.org
Cc: linux-me...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
Cc: linaro-mm-...@lists.linaro.org
Signed-off-by: John Hubbard
---
Note that I have only compile-tested this patch, although that does
also include cross-compiling for a few other arches.
thanks,
] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
[3] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Cc: "Kai Mäkisara"
Cc: James E.J. Bottomley
Cc: Martin K. Petersen
Cc: linux-s...@vge
arg. Also, if this series looks good, we can
ask Souptick to change the name as well, to whatever the consensus
is. My initial recommendation is: get_user_pages_fast_only(), to
match the new pin_user_pages_only().
John Hubbard (4):
mm/gup: move __get_user_pages_fast() down a few lines
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
driv
This is the FOLL_PIN equivalent of __get_user_pages_fast(),
except with a more descriptive name, and gup_flags instead of
a boolean "write" in the argument list.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 36 +++
f enabling interrupts was fragile at best.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 1 +
mm/gup.c | 60 ++
2 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a5
This is in order to avoid a forward declaration of
internal_get_user_pages_fast(), in the next patch.
This is code movement only--all generated code should
be identical.
Signed-off-by: John Hubbard
---
mm/gup.c | 112 +++
1 file changed, 56
full conversion in a single commit. But if it is not preferred way, I would go
as per feedback.
Thanks, I appreciate it! And yes, you'll want to do the "write" to "gup_flags"
conversion in a single patch, definitely.
thanks,
--
John Hubbard
NVIDIA
with what I'm doing here.
So, how would you like proceed? If you want to do the full conversion
(which really should include the call sites), it would be easier for me
if you based it on my upcoming small patchset, which I expect to post
shortly (later today).
thanks,
--
John Hubbard
NVIDIA
NFIG_ARCH_ENABLE_THP_MIGRATION
+ "thp_pmd_migration_success",
+ "thp_pmd_migration_failure",
+#endif
#endif
#ifdef CONFIG_MEMORY_BALLOON
"balloon_inflate",
thanks,
--
John Hubbard
NVIDIA
On 2020-05-17 23:01, John Hubbard wrote:
This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.
Oops
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
Hi,
N
[3] https://lore.kernel.org/r/20190723153640.gb...@lst.de
Signed-off-by: John Hubbard
---
Hi,
Note that I have only compile-tested this patch, although that does
also include cross-compiling for a few other arches.
thanks,
John Hubbard
NVIDIA
drivers/misc/mic/scif/scif_rma.c | 26
mann
Cc: Greg Kroah-Hartman
Signed-off-by: John Hubbard
---
Hi,
Note that I have only compile-tested this patch, although that does
also include cross-compiling for a few other arches...but it only
seemed to be supported on x86_64 and sparc, for those.
thanks,
John Hubbard
NVIDIA
drivers/misc/genw
, although that does
also include cross-compiling for half a dozen arches.
John Hubbard (2):
mm/gup: introduce pin_user_pages_unlocked
ivtv: convert get_user_pages() --> pin_user_pages()
drivers/media/pci/ivtv/ivtv-udma.c | 19 ++-
drivers/media/pci/ivtv/ivtv-yuv.c |
basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.
[1] Documentation/core-api/pin_user_pages.rst
[2] "Explicit pinning of user-space pages":
https://lwn.net/Articles/807108/
Signed-off-by: John Hubbard
---
dr
Introduce pin_user_pages_unlocked(), which is nearly identical to the
get_user_pages_unlocked() that it wraps, except that it sets FOLL_PIN
and rejects FOLL_GET.
Signed-off-by: John Hubbard
---
include/linux/mm.h | 2 ++
mm/gup.c | 17 +
2 files changed, 19 insertions
-compiling for half a dozen arches.
John Hubbard (2):
rapidio: fix an error in get_user_pages_fast() error handling
rapidio: convert get_user_pages() --> pin_user_pages()
drivers/rapidio/devices/rio_mport_cdev.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
successfully
pinned are released.
Fixes: e8de370188d0 ("rapidio: add mport char device driver")
Cc: Matt Porter
Cc: Alexandre Bounine
Cc: Sumit Semwal
Cc: Dan Carpenter
Cc: Andrew Morton
Cc: linux-me...@vger.kernel.org
Cc: sta...@vger.kernel.org
Signed-off-by: John Hubbard
---
drivers/rapid
lexandre Bounine
Cc: Sumit Semwal
Cc: Dan Carpenter
Cc: Andrew Morton
Cc: linux-me...@vger.kernel.org
Signed-off-by: John Hubbard
---
drivers/rapidio/devices/rio_mport_cdev.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/rapidio/devices/rio_mport_cdev.
301 - 400 of 1254 matches
Mail list logo