Re: [bio] 37abbdc72e: WARNING:at_block/bio.c:#bio_release_pages

2020-08-26 Thread John Hubbard
LL_PIN is not going to happen, but it's good to see that the system isn't doing anything unexpected here. thanks, -- John Hubbard NVIDIA kern :warn : [ 59.774973] blk_update_request+0x219/0x3c0 kern :warn : [ 59.775767] scsi_end_request+0x29/0x140 kern :warn : [ 59.

Re: [RFC PATCH 00/16] 1GB THP support on x86_64

2020-09-08 Thread John Hubbard
ture flags itself, I'd lean toward making it its own new syscall, maybe: compact_huge_pages(nbytes or npages, flags /* page size, etc */); ...thus leaving madvise() and it's remaining flags still available, to further refine things. thanks, -- John Hubbard NVIDIA

Re: [PATCH v3 3/3] bio: convert get_user_pages_fast() --> pin_user_pages_fast()

2020-08-31 Thread John Hubbard
On 8/31/20 9:52 AM, Ira Weiny wrote: On Mon, Aug 31, 2020 at 12:14:39AM -0700, John Hubbard wrote: @@ -1113,8 +1113,8 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) } else { if (is_bvec) ret

Re: [linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-08-31 Thread John Hubbard
ut that's beyond the scope of your work here. thanks, -- John Hubbard NVIDIA

Re: [linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-08-31 Thread John Hubbard
Reviewed-by: John Hubbard Few questions -> First, there are minor updates from v2 -> v3 other than addressing your review comments in v2. Would you like to review it again? I reviewed it again. Second, I think, as per Documentation/core-api/pin_user_pages.rst, this is case

Re: [linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-01 Thread John Hubbard
On 9/1/20 1:14 PM, Souptick Joarder wrote: Hi John, On Tue, Sep 1, 2020 at 4:28 AM John Hubbard wrote: On 8/31/20 3:07 PM, Souptick Joarder wrote: First, when memory allocation for sg_list_unaligned failed, there is a bug of calling put_pages() as we haven't pinned any pages. "we s

Re: [linux-next PATCH v4] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-01 Thread John Hubbard
of these changes, minor update in documentation. Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: Souptick Joarder Reviewed-by: Dan Carpenter Reviewed-by: John Hubbard --- This looks good to me. thanks, -- John Hubbard NVIDIA v2: Added

Re: [RFC PATCH 0/2] mm/gup: fix gup_fast with dynamic page table folding

2020-09-01 Thread John Hubbard
, pte) static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep , pte_t pte) { native_set_pte(ptep, pte); } This type of abstraction has worked out very well, IMHO. thanks, -- John Hubbard NVIDIA

Re: [GIT PULL] tee subsystem pin_user_pages for v5.8

2020-08-21 Thread John Hubbard
accepted, and the maintainer will eventually merge it", and I left it at that. It's still desirable. thanks, -- John Hubbard NVIDIA

[PATCH 5/5] fs/ceph: use pipe_get_pages_alloc() for pipe

2020-08-21 Thread John Hubbard
. Signed-off-by: John Hubbard --- fs/ceph/file.c | 3 +-- include/linux/uio.h | 3 ++- lib/iov_iter.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index d51c3f2fdca0..d3d7dd957390 100644 --- a/fs/ceph/file.c +++ b/fs/ceph

[PATCH 2/5] mm/gup: introduce pin_user_page()

2020-08-21 Thread John Hubbard
] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ [2] Documentation/core-api/pin_user_pages.rst Signed-off-by: John Hubbard --- include/linux/mm.h | 2 ++ mm/gup.c | 30 ++ 2 files changed, 32 insertions(+) diff --git

[PATCH 3/5] bio: convert get_user_pages_fast() --> pin_user_pages_fast()

2020-08-21 Thread John Hubbard
Signed-off-by: John Hubbard --- block/bio.c | 24 block/blk-map.c | 6 +++--- fs/direct-io.c | 28 ++-- fs/iomap/direct-io.c | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/block/bio.c b/block/b

[PATCH 1/5] iov_iter: introduce iov_iter_pin_user_pages*() routines

2020-08-21 Thread John Hubbard
routines that specifically call one or the other systems, for both page acquisition and page release. Signed-off-by: John Hubbard --- include/linux/uio.h | 5 +++ lib/iov_iter.c | 80 + 2 files changed, 85 insertions(+) diff --git a/include

[PATCH 0/5] bio: Direct IO: convert to pin_user_pages_fast()

2020-08-21 Thread John Hubbard
st, fuse, nfs/direct, vhost/scsi. About-to-be-converted sites (in a subsequent patch) are: Direct IO for filesystems that use the generic read/write functions. [1] https://lore.kernel.org/kvm/20190724061750.ga19...@infradead.org/ [2] "Explicit pinning of user-space pages": https://l

[PATCH 4/5] bio: introduce BIO_FOLL_PIN flag

2020-08-21 Thread John Hubbard
O_FOLL_PIN whenever pin_user_pages_fast() is used, and check for BIO_FOLL_PIN before using unpin_user_page(). Signed-off-by: John Hubbard --- block/bio.c | 9 +++-- block/blk-map.c | 3 ++- fs/direct-io.c| 4 ++-- include/linux/blk_types.h | 5 +++-- inc

Re: [PATCH 4/5] bio: introduce BIO_FOLL_PIN flag

2020-08-23 Thread John Hubbard
On 8/22/20 11:25 PM, Christoph Hellwig wrote: On Fri, Aug 21, 2020 at 09:20:58PM -0700, John Hubbard wrote: Add a new BIO_FOLL_PIN flag to struct bio, whose "short int" flags field was full, thuse triggering an expansion of the field from 16, to 32 bits. This allows for a nice

Re: [GIT PULL] tee subsystem pin_user_pages for v5.8

2020-08-24 Thread John Hubbard
On 8/23/20 11:51 PM, Jens Wiklander wrote: On Fri, Aug 21, 2020 at 11:19 PM Olof Johansson wrote: On Fri, Aug 21, 2020 at 12:58 PM John Hubbard wrote: On 8/21/20 11:49 AM, Olof Johansson wrote: On Tue, May 26, 2020 at 03:12:59PM +0200, Jens Wiklander wrote: Hello arm-soc maintainers

Re: [PATCH 4/5] bio: introduce BIO_FOLL_PIN flag

2020-08-24 Thread John Hubbard
On 8/22/20 11:57 PM, John Hubbard wrote: On 8/22/20 11:25 PM, Christoph Hellwig wrote: On Fri, Aug 21, 2020 at 09:20:58PM -0700, John Hubbard wrote: Add a new BIO_FOLL_PIN flag to struct bio, whose "short int" flags field was full, thuse triggering an expansion of the field from 16,

Re: [PATCH] mm/gup.c: Handling ERR within unpin_user_pages()

2020-09-14 Thread John Hubbard
fix up the callers. thanks, -- John Hubbard NVIDIA

[PATCH 2/2] selftests/vm: fix incorrect gcc invocation in some cases

2020-09-14 Thread John Hubbard
despite using incorrect values such as an *occasionally* incomplete LDLIBS value. Signed-off-by: John Hubbard --- tools/testing/selftests/vm/Makefile | 12 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index 9f2625bebf07..3

[PATCH 0/2] selftests/vm: fix some minor aggravating factors in the Makefile

2020-09-14 Thread John Hubbard
serfaultfd # ...userfaultfd fails to link, due to incomplete LDLIBS That's what Patch 0002 fixes. John Hubbard (2): selftests/vm: fix false build success on the second and later attempts selftests/vm: fix incorrect gcc invocation in some cases tools/testing/selftests/vm/Makefile | 17 ++

[PATCH 1/2] selftests/vm: fix false build success on the second and later attempts

2020-09-14 Thread John Hubbard
believing that there's nothing else to build. Fix this by telling Make to delete targets that didn't completely succeed. Signed-off-by: John Hubbard --- tools/testing/selftests/vm/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/vm/Makefile b/too

Re: [PATCH] mm/gup: protect unpin_user_pages() against npages==-ERRNO

2020-09-19 Thread John Hubbard
On 9/19/20 8:03 PM, Souptick Joarder wrote: On Thu, Sep 17, 2020 at 1:11 PM Dan Carpenter wrote: On Wed, Sep 16, 2020 at 11:57:06PM -0700, John Hubbard wrote: As suggested by Dan Carpenter, fortify unpin_user_pages() just a bit, against a typical caller mistake: check if the npages arg

Re: [PATCH] misc: mic: scif: Fix error handling path

2020-09-20 Thread John Hubbard
: Souptick Joarder Cc: John Hubbard Cc: Ira Weiny Cc: Dan Carpenter --- Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA drivers/misc/mic/scif/scif_rma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mic/scif/scif_rma.c b/drivers/misc/mic

Re: [PATCH 4/5] mm: Do early cow for pinned pages during fork() for ptes

2020-09-21 Thread John Hubbard
_user_pages*() side of it. But the pin count will need to remain, in order to discern between DMA pins and temporary refcount boosts. thanks, -- John Hubbard NVIDIA

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-21 Thread John Hubbard
miss the opportunity to make it a tiny bit cleaner to the reader. thanks, -- John Hubbard NVIDIA

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-21 Thread John Hubbard
On 9/21/20 4:53 PM, John Hubbard wrote: On 9/21/20 2:17 PM, Peter Xu wrote: (Commit message collected from Jason Gunthorpe) Reduce the chance of false positive from page_maybe_dma_pinned() by keeping Not yet, it doesn't. :)  More: track if the mm_struct has ever been used

Re: [PATCH 4/5] mm: Do early cow for pinned pages during fork() for ptes

2020-09-21 Thread John Hubbard
On 9/21/20 3:27 PM, Jann Horn wrote: On Tue, Sep 22, 2020 at 12:18 AM John Hubbard wrote: On 9/21/20 2:55 PM, Jann Horn wrote: On Mon, Sep 21, 2020 at 11:20 PM Peter Xu wrote: ... Ah... the documentation you linked implies that FOLL_WRITE should more or less imply FOLL_PIN? I didn't

Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-10 Thread John Hubbard
e 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

Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding

2020-09-10 Thread John Hubbard
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

Re: [PATCH v2] mm/gup: fix gup_fast with dynamic page table folding

2020-09-15 Thread John Hubbard
a42010cdc26 ("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 Hubbard NVIDIA v2: added brac

Re: [PATCH 1/4] mm: Trial do_wp_page() simplification

2020-09-15 Thread John Hubbard
quot;definitely not DMA-pinned", via this API call: static inline bool page_maybe_dma_pinned(struct page *page) ...which does *not* always use GUP_PIN_COUNTING_BIAS to provide that answer. thanks, -- John Hubbard NVIDIA

Re: [linux-next PATCH] rapidio: Fix error handling path

2020-09-16 Thread John Hubbard
r") Signed-off-by: Souptick Joarder Cc: Ira Weiny Cc: John Hubbard Cc: Matthew Wilcox --- drivers/rapidio/devices/rio_mport_cdev.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio

Re: [PATCH v3 5/6] mm/gup: migrate pinned pages out of movable zone

2020-12-11 Thread John Hubbard
to let the callers retry? Obviously that would be a separate patch and I'm not sure it's safe to make that change, but the current loop seems buried maybe too far down. Thoughts, anyone? thanks, -- John Hubbard NVIDIA

Re: [PATCH v14 10/10] secretmem: test: add basic selftest for memfd_secret(2)

2020-12-11 Thread John Hubbard
y! Just these: bool vma_is_secretmem(struct vm_area_struct *vma); bool page_is_secretmem(struct page *page); bool secretmem_active(void); ...or am I just Doing It Wrong? :) thanks, -- John Hubbard NVIDIA

Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread John Hubbard
= contig_start + readahead_batch_length(rac); + u64 contig_end = contig_start + readahead_batch_length(rac) - 1; Yes, confirmed on my end, too. thanks, -- John Hubbard NVIDIA

Re: [PATCH v4 09/10] selftests/vm: test flag is broken

2020-12-18 Thread John Hubbard
write = 1; break; + case 'W': + write = 0; + break; case 'f': file = optarg; break; thanks, -- John Hubbard NVIDIA

Re: [PATCH v4 09/10] selftests/vm: test flag is broken

2020-12-18 Thread John Hubbard
On 12/18/20 1:06 AM, John Hubbard wrote: Add a new test_flags field, to allow raw gup_flags to work. I think .test_control_flags field would be a good name, to make it very clear that it's not destined for gup_flags. Just .test_flags is not quite as clear a distinction from .gup_flags

Re: [PATCH v4 10/10] selftests/vm: test faulting in kernel, and verify pinnable pages

2020-12-18 Thread John Hubbard
- p[0] = 0; + if (touch) { + gup.flags |= FOLL_TOUCH; + } else { + for (; (unsigned long)p < gup.addr + size; p += PAGE_SIZE) + p[0] = 0; + } OK. /* Only report timing information on the *_BENCHMARK command

Re: [PATCH v4 10/10] selftests/vm: test faulting in kernel, and verify pinnable pages

2020-12-19 Thread John Hubbard
s, "skip faulting pages in from user space". That's a lot clearer! And you can tell it's better, because we don't have to write a chunk of documentation explaining the odd quirks. Ha, it feels better! What do you think? (Again, if you want me to send over some diffs that put this all together, let me know. I'm kind of embarrassed at all the typing required here.) thanks, -- John Hubbard NVIDIA

Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread John Hubbard
it out early. thanks, -- John Hubbard NVIDIA

Re: [RFCv2 08/16] KVM: Use GUP instead of copy_from/to_user() to access guest memory

2020-10-22 Thread John Hubbard
On 10/22/20 4:49 AM, Matthew Wilcox wrote: On Tue, Oct 20, 2020 at 01:25:59AM -0700, John Hubbard wrote: Should copy_to_guest() use pin_user_pages_unlocked() instead of gup_unlocked? We wrote a "Case 5" in Documentation/core-api/pin_user_pages.rst, just for this situation, I think

Re: [PATCH 1/2] mm: reorganize internal_get_user_pages_fast()

2020-10-23 Thread John Hubbard
if (ret < 0) - ret = nr_pinned; - else - ret += nr_pinned; - } + if (nr_pinned) + return nr_pinned; + return ret; } - - return ret; + return ret + nr_pinned; } /** * get_user_pages_fast_only() - pin user pages in memory thanks, -- John Hubbard NVIDIA

Re: [RFCv2 08/16] KVM: Use GUP instead of copy_from/to_user() to access guest memory

2020-10-25 Thread John Hubbard
On 10/25/20 9:21 PM, Matthew Wilcox wrote: On Thu, Oct 22, 2020 at 12:58:14PM -0700, John Hubbard wrote: On 10/22/20 4:49 AM, Matthew Wilcox wrote: On Tue, Oct 20, 2020 at 01:25:59AM -0700, John Hubbard wrote: Should copy_to_guest() use pin_user_pages_unlocked() instead of gup_unlocked? We

[PATCH v3 4/9] selftests/vm: minor cleanup: Makefile and gup_test.c

2020-10-26 Thread John Hubbard
of one special rule already. Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan --- tools/testing/selftests/vm/Makefile | 10 -- tools/testing/selftests/vm/gup_test.c | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff

[PATCH v3 9/9] selftests/vm: 2x speedup for run_vmtests.sh

2020-10-26 Thread John Hubbard
cation down to about 1.0 sec. This should still provide a reasonable smoke test, while staying within a nominal time budget of around 1 second or so per test. And this brings the overall running time of run_vmtests.sh down to 11 second. Cc: Mike Rapoport Cc: Shuah Khan Signed-off-by: John Hubbard

[PATCH v3 6/9] selftests/vm: gup_test: introduce the dump_pages() sub-test

2020-10-26 Thread John Hubbard
use THP pages -F 1:use pin_user_pages() instead of get_user_pages() 0 19 0x1000: dump pages 0, 19, and 4096 Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan --- mm/Kconfig| 6 +++ mm/

[PATCH v3 5/9] selftests/vm: only some gup_test items are really benchmarks

2020-10-26 Thread John Hubbard
for cmd, now that it's being compared Otherwise it doesn't work, because in this case cmd is about 3 billion, which is the perfect size for problems with signed vs unsigned int. Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan

[PATCH v3 8/9] selftests/vm: hmm-tests: remove the libhugetlbfs dependency

2020-10-26 Thread John Hubbard
in hmm-test.c (local_config.h), and one for inclusion in the Makefile (local_config.mk). Signed-off-by: John Hubbard Cc: Ralph Campbell Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Shuah Khan --- tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile| 24

[PATCH v3 2/9] selftests/vm: use a common gup_test.h

2020-10-26 Thread John Hubbard
, but this low-level, kernel-developer-oriented selftests/vm system is very much not subject to ABI stability. So "expansion" and "reserved" fields are unnecessary here. Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan

[PATCH v3 3/9] selftests/vm: rename run_vmtests --> run_vmtests.sh

2020-10-26 Thread John Hubbard
Rename to *.sh, in order to match the conventions of all of the other items in selftest/vm. The only reason not to use a .sh suffix a shell script like this, might be to make it look more like a normal program, but that's not an issue here. Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc

[PATCH v3 0/9] selftests/vm: gup_test, hmm-tests, assorted improvements

2020-10-26 Thread John Hubbard
inor assorted improvements. [1] v2 is here: https://lore.kernel.org/linux-doc/20200929212747.251804-1-jhubb...@nvidia.com/ [2] https://lore.kernel.org/r/CAHk-=wgh-tmphly3juehx7y2fwh3d+nmbqvs__azm6-oorq...@mail.gmail.com John Hubbard (9): mm/gup_benchmark: rename to mm/gup_test selftests/vm: use a co

[PATCH v3 7/9] selftests/vm: run_vmtests.sh: update and clean up gup_test invocation

2020-10-26 Thread John Hubbard
Run benchmarks on the _fast variants of gup and pup, as originally intended. Run the new gup_test sub-test: dump pages. In addition to exercising the dump_page() call, it also demonstrates the various options you can use to specify which pages to dump, and how. Signed-off-by: John Hubbard Cc

[PATCH v3 1/9] mm/gup_benchmark: rename to mm/gup_test

2020-10-26 Thread John Hubbard
importantly, however, subsequent patches are about to add some functionality that is non-benchmark related. Closely related changes: * Kconfig: in addition to renaming the options from GUP_BENCHMARK to GUP_TEST, update the help text to reflect that it's no longer a benchmark-only test. Signed-off-

[PATCH] mm: cleanup: remove unused tsk arg from __access_remote_vm

2020-10-26 Thread John Hubbard
Despite a comment that said that page fault accounting would be charged to whatever task_struct* was passed into __access_remote_vm(), the tsk argument was actually unused. Delete both the comment, and the argument. Signed-off-by: John Hubbard Cc: Oleg Nesterov --- Hi, Just something

Re: [mm/gup] 47e29d32af: phoronix-test-suite.npb.FT.A.total_mop_s -45.0% regression

2020-11-18 Thread John Hubbard
On 11/18/20 10:17 AM, Dan Williams wrote: On Wed, Nov 18, 2020 at 5:51 AM Jan Kara wrote: On Mon 16-11-20 19:35:31, John Hubbard wrote: On 11/16/20 6:48 PM, kernel test robot wrote: Greeting, FYI, we noticed a -45.0% regression of phoronix-test-suite.npb.FT.A.total_mop_s due to commit

Re: [RFCv2 08/16] KVM: Use GUP instead of copy_from/to_user() to access guest memory

2020-10-26 Thread John Hubbard
On 10/26/20 6:28 AM, Matthew Wilcox wrote: On Sun, Oct 25, 2020 at 09:44:07PM -0700, John Hubbard wrote: On 10/25/20 9:21 PM, Matthew Wilcox wrote: I don't think the page pinning approach is ever valid. For file Could you qualify that? Surely you don't mean that the entire pin_user_pages

Re: [PATCH v2 1/2] mm: reorganize internal_get_user_pages_fast()

2020-10-30 Thread John Hubbard
ed can be streamlined a bit No functional change. Signed-off-by: Jason Gunthorpe --- mm/gup.c | 99 ++-- 1 file changed, 54 insertions(+), 45 deletions(-) Everything still looks correct. Reviewed-by: John Hubbard thanks, -- John Hubbard

Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM

2020-10-30 Thread John Hubbard
about this: (for vm_flags and vma_is_fsdax) we can also streamline the code a lot. Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa Cc: Mauro Carvalho Chehab Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc

Re: [PATCH v5 13/15] resource: Move devmem revoke code to resource framework

2020-10-31 Thread John Hubbard
Gunthorpe Cc: Kees Cook Cc: Dan Williams Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: Dan Williams Cc: linux...@kvack.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: linux-me...@vger.kernel.org Cc: Arnd Bergmann Cc: Greg Kroah

Re: [PATCH v3 1/7] compiler-clang: add build check for clang 10.0.1

2020-11-16 Thread John Hubbard
ror Sorry, your version of Clang is too old - please use 10.0.1 or newer. #endif +#endif /* Compiler specific definitions for Clang compiler */ thanks, -- John Hubbard NVIDIA

Re: [mm/gup] 47e29d32af: phoronix-test-suite.npb.FT.A.total_mop_s -45.0% regression

2020-11-16 Thread John Hubbard
n counts for huge pages") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master ...but that commit happened in April, 2020. Surely if this were a serious issue we would have some other indication...is this worth following up on?? I'm inclined to ignore it, honestly. th

Re: Pinning ZONE_MOVABLE pages

2020-11-23 Thread John Hubbard
opinion from the community on an appropriate path forward for this problem. If what I described sounds reasonable, or if there are other ideas on how to address the problem that I am seeing. I'm also in favor with avoiding (3) for now and maybe forever, depending on how it goes. Good luck... :) thanks, --

Re: [PATCH 1/6] mm/gup: perform check_dax_vmas only when FS_DAX is enabled

2020-12-03 Thread John Hubbard
) +{ + return false; +} +#endif #ifdef CONFIG_CMA static long check_and_migrate_cma_pages(struct mm_struct *mm, Looks obviously correct, and the follow-up simplication is very nice. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA

Re: [PATCH 2/6] mm/gup: don't pin migrated cma pages in movable zone

2020-12-03 Thread John Hubbard
; struct migration_target_control mtc = { .nid = NUMA_NO_NODE, - .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_NOWARN, + .gfp_mask = GFP_USER | __GFP_NOWARN, }; check_again: Reviewed-by: John Hubbard ...while I was here, I noticed

Re: [PATCH 3/6] mm/gup: make __gup_longterm_locked common

2020-12-03 Thread John Hubbard
-#endif /* CONFIG_FS_DAX || CONFIG_CMA */ static bool is_valid_gup_flags(unsigned int gup_flags) { At last some simplification here, yea! Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA

Re: [PATCH 4/6] mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_NOMOVABLE

2020-12-03 Thread John Hubbard
lingering rename candidates after this series is applied. And it's a good rename. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA --- include/linux/sched.h| 2 +- include/linux/sched/mm.h | 21 + mm/gup.c | 4 ++-- mm/hugetlb.c

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread John Hubbard
gs, which right now happen to only cover CMA flags, so the original name seems accurate, right? thanks, John Hubbard NVIDIA { #ifdef CONFIG_CMA - unsigned int pflags = current->flags; - - if (!(pflags & PF_MEMALLOC_NOMOVABLE) && - gfp

Re: [PATCH 6/6] mm/gup: migrate pinned pages out of movable zone

2020-12-03 Thread John Hubbard
at this point it's a relief to finally see the nested ifdefs get removed. One naming nit/idea below, but this looks fine as is, so: Reviewed-by: John Hubbard diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 0f8d1583fa8e..00bab23d1ee5 100644 --- a/include/linux/migrate.h +++ b/include

Re: [PATCH 5/6] mm: honor PF_MEMALLOC_NOMOVABLE for all allocations

2020-12-03 Thread John Hubbard
ags; So, keeping "current" in the function name makes its intent misleading. OK, I see. That sounds OK then. thanks, -- John Hubbard NVIDIA

Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM

2020-11-05 Thread John Hubbard
not seeing a pud_mkhugespecial anywhere. So not sure this works, but probably just me missing something again. It means ioremap can't create an IO page PUD, it has to be broken up. Does ioremap even create anything larger than PTEs? From my reading, yes. See ioremap_try_huge_pmd(). thanks, -- John

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-06 Thread John Hubbard
On 11/4/20 2:05 AM, Barry Song wrote: Without DEBUG_FS, all the code in gup_benchmark becomes meaningless. For sure kernel provides debugfs stub while DEBUG_FS is disabled, but the point here is that GUP_BENCHMARK can do nothing without DEBUG_FS. Cc: John Hubbard Cc: Ralph Campbell Inspired

Re: [PATCH 2/2] tomoyo: Fixed typo in documentation

2020-11-07 Thread John Hubbard
On 11/7/20 12:24 AM, Souptick Joarder wrote: Fixed typo s/Poiner/Pointer Fixes: 5b636857fee6 ("TOMOYO: Allow using argv[]/envp[] of execve() as conditions.") Signed-off-by: Souptick Joarder Cc: John Hubbard --- security/tomoyo/domain.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-07 Thread John Hubbard
p us on the straight and narrow, just in case I'm misunderstanding something. [1] https://lore.kernel.org/r/e78fb7af-627b-ce80-275e-51f97f1f3...@nvidia.com thanks, -- John Hubbard NVIDIA [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lw

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: -Original Message- From: John Hubbard [mailto:jhubb...@nvidia.com] ... config GUP_BENCHMARK bool "Enable infrastructure for get_user_pages() and related calls benchmarking" + depends on DEBUG_FS I thi

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-07 Thread John Hubbard
On 11/7/20 1:04 AM, John Hubbard wrote: On 11/7/20 12:24 AM, Souptick Joarder wrote: In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. This is case 5 as per documen

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 2:20 PM, Randy Dunlap wrote: On 11/7/20 11:16 AM, John Hubbard wrote: On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: -Original Message- From: John Hubbard [mailto:jhubb...@nvidia.com] ...    config GUP_BENCHMARK    bool "Enable infrastru

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 4:24 PM, Randy Dunlap wrote: On 11/7/20 4:03 PM, John Hubbard wrote: On 11/7/20 2:20 PM, Randy Dunlap wrote: On 11/7/20 11:16 AM, John Hubbard wrote: On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: ... OK, thanks, I see how you get that list now. JFTR, those are not 42

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-07 Thread John Hubbard
On 11/7/20 5:13 PM, Tetsuo Handa wrote: On 2020/11/08 4:17, John Hubbard wrote: On 11/7/20 1:04 AM, John Hubbard wrote: On 11/7/20 12:24 AM, Souptick Joarder wrote: In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] &

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 6:58 PM, Song Bao Hua (Barry Song) wrote: On 11/7/20 2:20 PM, Randy Dunlap wrote: On 11/7/20 11:16 AM, John Hubbard wrote: On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: From: John Hubbard [mailto:jhubb...@nvidia.com] ... But if you really disagree, then I'd go with, just

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
On 11/7/20 7:14 PM, John Hubbard wrote: On 11/7/20 6:58 PM, Song Bao Hua (Barry Song) wrote: On 11/7/20 2:20 PM, Randy Dunlap wrote: On 11/7/20 11:16 AM, John Hubbard wrote: On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: From: John Hubbard [mailto:jhubb...@nvidia.com] ... But if you

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
abled" depends on !GUP_TEST && !DEBUG_FS Sweet--I just applied that here, and it does exactly what I wanted: puts a nice clear message on the "make menuconfig" screen. No more hidden item. Brilliant! Let's go with that, shall we? thanks, -- John Hubbard NVIDIA

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-07 Thread John Hubbard
On 11/7/20 8:12 PM, Tetsuo Handa wrote: On 2020/11/08 11:17, John Hubbard wrote: Excuse me, but Documentation/core-api/pin_user_pages.rst says "CASE 5: Pinning in order to _write_ to the data within the page" while tomoyo_dump_page() is for "_read_ the data within the pa

Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

2020-11-07 Thread John Hubbard
t, having options appear and disappear on me, in this system. If they all had this "comment" behavior by default, to show up as a placeholder, I think it would be a better user experience. thanks, -- John Hubbard NVIDIA

Re: [PATCH 2/2] tomoyo: Fixed typo in documentation

2020-11-08 Thread John Hubbard
On 11/8/20 7:41 PM, Souptick Joarder wrote: On Sat, Nov 7, 2020 at 2:27 PM John Hubbard wrote: On 11/7/20 12:24 AM, Souptick Joarder wrote: Fixed typo s/Poiner/Pointer Fixes: 5b636857fee6 ("TOMOYO: Allow using argv[]/envp[] of execve() as conditions.") Signed-off-by: Souptick J

Re: [PATCH v2] mm/gup_test: GUP_TEST depends on DEBUG_FS

2020-11-08 Thread John Hubbard
On 11/8/20 12:37 AM, Barry Song wrote: Without DEBUG_FS, all the code in gup_test becomes meaningless. For sure kernel provides debugfs stub while DEBUG_FS is disabled, but the point here is that GUP_TEST can do nothing without DEBUG_FS. Cc: John Hubbard Cc: Ralph Campbell Cc: Randy Dunlap

Re: linux-next: Tree for Aug 23

2019-08-23 Thread John Hubbard
*sub = NULL, *match; int ret; ...which I didn't create patches for, because I expect they are already in flight. But if those somehow got lost or skipped, then here's an early warning that these fixes still need to be applied. thanks, -- John Hubbard NVIDIA

Re: [PATCH] rdma: siw: remove unused variable

2019-07-29 Thread John Hubbard
rew) I also sent out a fix for it, as a reply-to the warning report: https://lore.kernel.org/r/20190729074306.10368-1-jhubb...@nvidia.com Pasting in my response (minus the trivial fix), to save you a click: "This fixes the warning. Ideally this should be merged with the commit that it fixes, if that's still possible. "Andrew, would you also like a fixed version of this patch posted as a new version of the 3-patch set that it came with?" thanks, -- John Hubbard NVIDIA

[PATCH v2] x86/boot: save fields explicitly, zero out everything else

2019-07-30 Thread john . hubbard
From: John Hubbard Recent gcc compilers (gcc 9.1) generate warnings about an out of bounds memset, if you trying memset across several fields of a struct. This generated a couple of warnings on x86_64 builds. Fix this by explicitly saving the fields in struct boot_params that are intended

[PATCH v2 0/1] x86/boot: save fields explicitly, zero out everything else

2019-07-30 Thread john . hubbard
From: John Hubbard Hi, This uses the "save each field explicitly" approach that we discussed during the first review [1]. As in [1], this is motivated by a desire to clear the compiler warnings when building with gcc 9. This is difficult to properly test. I've done a basic

Re: [PATCH v2] checkpatch: add *_NOTIFIER_HEAD as var definition

2019-08-19 Thread John Hubbard
-off-by: Gilad Ben-Yossef Cc: John Hubbard --- Changes from v1: - Fixed misposition of braces. - Tested on 1k last commits from Linux tree. Hi Gilad, I re-ran this updated patch, on my local patches that were showing the problem, and it is All Better Now. :) So you can add: Tested-by: John

Re: [Linux-kernel-mentees][PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*()

2019-08-19 Thread John Hubbard
that review or ACK was done for part of the conversion), and adds the additional gup(FOLL_PIN), and uses vaddr*() wrappers instead of gup/pup. [1] https://lore.kernel.org/r/20190807013340.9706-1-jhubb...@nvidia.com [2] https://lore.kernel.org/r/20190809175210.gr18...@dhcp22.suse.cz thanks, -- John

Re: [RFC PATCH v2 2/3] mm/gup: introduce FOLL_PIN flag for get_user_pages()

2019-08-19 Thread John Hubbard
On 8/16/19 7:36 PM, John Hubbard wrote: On 8/16/19 7:24 PM, jhubb...@nvidia.com wrote: From: John Hubbard DKIM-Signature: v a a-sha256; claxed/relaxed; d idia.com; s; t66008674; bhMai0va6k/z2enpQJ4Nfvbj5WByFxGAO1JwdIBbXioh PGP-Universal:From:To:CC:Subject:Date:Message

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-19 Thread John Hubbard
. +1 for these rules, assuming that we can make them work. They are easy to explain and intuitive. thanks, -- John Hubbard NVIDIA

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-19 Thread John Hubbard
On 8/19/19 6:20 PM, Dave Chinner wrote: On Mon, Aug 19, 2019 at 05:05:53PM -0700, John Hubbard wrote: On 8/19/19 2:24 AM, Dave Chinner wrote: On Mon, Aug 19, 2019 at 08:34:12AM +0200, Jan Kara wrote: On Sat 17-08-19 12:26:03, Dave Chinner wrote: On Fri, Aug 16, 2019 at 12:05:28PM -0700, Ira

Re: [Linux-kernel-mentees][PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*()

2019-08-20 Thread John Hubbard
On 8/20/19 1:18 AM, Michal Hocko wrote: On Mon 19-08-19 12:30:18, John Hubbard wrote: On 8/19/19 12:06 PM, Bharath Vedartham wrote: On Mon, Aug 19, 2019 at 07:56:11AM -0500, Dimitri Sivanich wrote: ... Conversion of gup/put_page sites: Before: get_user_pages

[PATCH 3/4] mm/gup: introduce FOLL_PIN flag for get_user_pages()

2019-08-20 Thread John Hubbard
o Cc: Ira Weiny Signed-off-by: John Hubbard --- include/linux/mm.h | 56 +- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index bc675e94ddf8..6e7de424bf5e 100644 --- a/include/linux/mm.h +++ b/inc

[PATCH 1/4] checkpatch: revert broken NOTIFIER_HEAD check

2019-08-20 Thread John Hubbard
not included] ... )/ at ./scripts/checkpatch.pl line 3889. This is broken, so revert it until a better solution is found. Fixes: 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var definition") Cc: Andy Whitcroft Cc: Joe Perches Cc: Gilad Ben-Yossef Cc: Ofir Drang Cc: Andrew Morton Sign

[PATCH 4/4] mm/gup: introduce vaddr_pin_pages_remote(), and invoke it

2019-08-20 Thread John Hubbard
converted, and the tracking of pages is activated. Also, change process_vm_rw_single_vec() to invoke the new function. Signed-off-by: John Hubbard --- include/linux/mm.h | 5 + mm/gup.c | 33 + mm/process_vm_access.c | 23 ++- 3 fil

[PATCH 2/4] For Ira: tiny formatting tweak to kerneldoc

2019-08-20 Thread John Hubbard
For your vaddr_pin_pages() and vaddr_unpin_pages(). Just merge it into wherever it goes please. Didn't want to cause merge problems so it's a separate patch-let. Signed-off-by: John Hubbard --- mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c

<    1   2   3   4   5   6   7   8   9   10   >