[PATCH] oradax: convert get_user_pages() --> pin_user_pages()

2020-05-16 Thread John Hubbard
: David S. Miller Cc: sparcli...@vger.kernel.org Signed-off-by: John Hubbard --- drivers/sbus/char/oradax.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c index 8af216287a84..21b7cb6e7e70 100644 --- a/drivers/sbus/char/or

[PATCH] rds: convert get_user_pages() --> pin_user_pages()

2020-05-16 Thread John Hubbard
r 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 | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/rds/info.c b/net/rds/info.c index 03f6fd56d237..e1d63563e8

[PATCH] fpga: dfl: afu: convert get_user_pages() --> pin_user_pages()

2020-05-16 Thread John Hubbard
c: Moritz Fischer Cc: linux-f...@vger.kernel.org Signed-off-by: John Hubbard --- drivers/fpga/dfl-afu-dma-region.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c index 62f924489db5..84f696d5

[PATCH 1/1] selftests/vm/.gitignore: add khugepaged, mremap_dontunmap

2020-05-16 Thread John Hubbard
Add mremap_dontunmap and khugepaged to .gitignore. Fixes: 6582dba23f8b ("khugepaged: add self test") Fixes: 0c28759ee3c9 ("selftests: add MREMAP_DONTUNMAP selftest") Cc: Kirill A. Shutemov Cc: Brian Geffon Signed-off-by: John Hubbard --- tools/testing/selftests/vm/.giti

[PATCH 0/1] selftests/vm: .gitignore fixes for mmotm

2020-05-16 Thread John Hubbard
ore. This approach allows merging to work without manual intervention in this case. [1] https://lore.kernel.org/r/20200517001245.361762-3-jhubb...@nvidia.com John Hubbard (1): selftests/vm/.gitignore: add khugepaged, mremap_dontunmap tools/testing/selftests/vm/.gitignore | 2 ++ 1 file change

[PATCH 1/2] selftests/vm/write_to_hugetlbfs.c: fix unused variable warning

2020-05-16 Thread John Hubbard
Remove unused variable "i", which was triggering a compiler warning. Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests") Cc: Mina Almasry Signed-off-by: John Hubbard --- tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 -- 1 file changed, 2 dele

[PATCH 2/2] selftests/vm/.gitignore: add mremap_dontunmap

2020-05-16 Thread John Hubbard
Add mremap_dontunmap to .gitignore. Fixes: 0c28759ee3c9 ("selftests: add MREMAP_DONTUNMAP selftest") Cc: Brian Geffon Signed-off-by: John Hubbard --- tools/testing/selftests/vm/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/vm/.gitignore b/too

[PATCH 0/2] selftests/vm: minor fixes for 5.7-rc5

2020-05-16 Thread John Hubbard
that will also add a different item ("khugepaged") to the *bottom* of .gitignore. * The write_to_hugetlbfs.c fix is already applied to linux-next, but doesn't seem to be getting picked up for linux.git. Maybe it's in the merge pipeline, but if not, let's fix it here, be

Re: [RFC] mm/vmstat: Add events for THP migration without split

2020-05-14 Thread John Hubbard
ermore depend on today's exact code. Maybe Zi Yan's recommended name is exactly right, in fact: THP_PMD_MIGRATION_SUCCESS thanks, -- John Hubbard NVIDIA 2. With split pgmigrate_success 512 pgmigrate_fail 0 thp_pmd_migration

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-07 Thread John Hubbard
o. In fact, on the contrary: there are call site where returning 0 after being requested to pin zero pages, helps simplify the code. For example, if they're just doing math such as "if(nr_expected != nr_pages_pinned) ...". This looks like a complete dead end, sorry. thanks, -- John Hubbard NVIDIA

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-05 Thread John Hubbard
On 2020-05-05 13:36, Souptick Joarder wrote: On Wed, May 6, 2020 at 1:08 AM John Hubbard wrote: On 2020-05-05 12:14, Souptick Joarder wrote: Currently {get|pin}_user_pages_fast() have 3 return value 0, -errno and no of pinned pages. The only case where these two functions will return 0, is

Re: [RFC] mm/gup.c: Updated return value of {get|pin}_user_pages_fast()

2020-05-05 Thread John Hubbard
len))) return -EFAULT; ...although I might be missing some other things that need a similar change, so you should look carefully for yourself. Once that change (and anything I missed) is in place, then you could go ahead and stop handling ret==0 cases at the call sites. thanks, --

Re: [PATCH hmm v2 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault

2020-05-04 Thread John Hubbard
N_VALID]; + return pmd_write(pmd) ? (HMM_PFN_VALID | HMM_PFN_WRITE) : HMM_PFN_VALID; I always found the previous range->flags[...] approach hard to remember, so it's nice to see a simpler version now. thanks, -- John Hubbard NVIDIA

Re: [PATCH hmm v2 4/5] mm/hmm: remove HMM_PFN_SPECIAL

2020-05-04 Thread John Hubbard
On 2020-05-01 11:20, Jason Gunthorpe wrote: From: Jason Gunthorpe This is just an alias for HMM_PFN_ERROR, nothing cares that the error was because of a special page vs any other error case. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA Acked-by: Felix Kuehling Reviewed-by

Re: [PATCH hmm v2 2/5] mm/hmm: make hmm_range_fault return 0 or -1

2020-05-04 Thread John Hubbard
>= are still at their input * values. */ Either way, Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA } while (ret == -EBUSY); - - if (ret) - return ret; - return (hmm_vma_walk.last - range->start)

Re: [PATCH hmm v2 1/5] mm/hmm: make CONFIG_DEVICE_PRIVATE into a select

2020-05-01 Thread John Hubbard
On 2020-05-01 11:20, Jason Gunthorpe wrote: From: Jason Gunthorpe There is no reason for a user to select this or not directly - it should be selected by drivers that are going to use the feature, similar to how CONFIG_HMM_MIRROR works. Yes, this is a nice touch. Reviewed-by: John Hubbard

Re: [PATCH] mm/gup.c: Handle error at earliest for incorrect nr_pages value

2020-05-01 Thread John Hubbard
re you still advocating for this? If you want to change the gup/pup API so that asking for zero pages means -EINVAL, then fine, go for it. That's a large thing, and a tree-wide audit, but if you feel it's worth pursuing then it's at least consistent. But this patch here needs to be a

Re: [PATCH] mm/gup.c: Corrected document reference path

2020-04-30 Thread John Hubbard
deletions(-) Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA diff --git a/mm/gup.c b/mm/gup.c index 7ce796c..4952f12 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2864,10 +2864,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, * the arguments here are identical

Re: [PATCH v1 1/1] fs/splice: add missing callback for inaccessible pages

2020-04-30 Thread John Hubbard
low will be narrowly focused. Thinking again about this I am no longer sure. Adding John Hubbard. Documentation/core-api/pin_user_pages.rst says: ---snip-- Another way of thinking about these flags is as a progression of restrictions: FOLL_GET is for struct page manipulation,

Re: [PATCH] mm: gup: fix comment of __get_user_pages()

2019-10-23 Thread John Hubbard
d with mmap_sem held. It may be released. See below. * Patch ordering: I'll have to change the above as part of my upcoming series, to make it refer to "put_page() or put_user_page(), depending on FOLL_PIN", approximately. (Just more of a note to self than anything else, here.) thanks, John Hubbard NVIDIA

Re: [PATCH 1/1] mm/gup_benchmark: fix MAP_HUGETLB case

2019-10-22 Thread John Hubbard
On 10/22/19 11:57 AM, Jerome Glisse wrote: > On Tue, Oct 22, 2019 at 11:41:57AM -0700, John Hubbard wrote: >> On 10/22/19 10:14 AM, Jerome Glisse wrote: >>> On Mon, Oct 21, 2019 at 02:24:35PM -0700, John Hubbard wrote: >>>> The MAP_HUGETLB ("-H" option) o

Re: [PATCH 1/1] mm/gup_benchmark: fix MAP_HUGETLB case

2019-10-22 Thread John Hubbard
On 10/22/19 10:14 AM, Jerome Glisse wrote: > On Mon, Oct 21, 2019 at 02:24:35PM -0700, John Hubbard wrote: >> The MAP_HUGETLB ("-H" option) of gup_benchmark fails: >> >> $ sudo ./gup_benchmark -H >> mmap: Invalid argument >> >> This is because g

[PATCH 1/1] mm/gup_benchmark: fix MAP_HUGETLB case

2019-10-21 Thread John Hubbard
e problem is that the user space program, gup_benchmark.c, really just wants anonymous memory here. The simplest way to get that is to pass MAP_ANONYMOUS whenever MAP_HUGETLB is specified, so that's what this patch does. Cc: Keith Busch Signed-off-by: John Hubbard --- tools/testing/selftests

[PATCH 0/1] mm/gup_benchmark: fix MAP_HUGETLB case

2019-10-21 Thread John Hubbard
orces MAP_ANONYMOUS for the MAP_HUGETLB case. However, another way to do it might be to mmap() against a valid hugetlb page file, instead of /dev/zero. But that seems like a lot of trouble and if I'm reading the intent correctly, MAP_ANONYMOUS is what's desired anyway. John Hubbard (1): m

Re: [PATCH V3] mm/page_alloc: Add alloc_contig_pages()

2019-10-17 Thread John Hubbard
On 10/17/19 8:28 PM, Anshuman Khandual wrote: > On 10/18/2019 02:44 AM, John Hubbard wrote: >> On 10/17/19 1:24 AM, Anshuman Khandual wrote: ... > Yeah, it is bit non-trivial because v5 of the pgtable tests are still > on the latest linux-next (20191015 or 20191017). You will need

Re: [PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread John Hubbard
On 10/17/19 9:27 PM, Viresh Kumar wrote: > On 17-10-19, 17:04, John Hubbard wrote: >> The following build warning occurred on powerpc 64-bit builds: >> >> drivers/cpufreq/powernv-cpufreq.c: In function 'init_chip_info': >> drivers/cpufreq/powernv-cpufreq.c:10

[PATCH v2] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread John Hubbard
o Pmax capping at chip level") Cc: Shilpasri G Bhat Cc: Preeti U Murthy Cc: Viresh Kumar Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: John Hubbard --- Changes since v1: includes Viresh's review commit fixes. drivers/cp

Re: [PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread John Hubbard
On 10/17/19 9:38 PM, Viresh Kumar wrote: > On 17-10-19, 21:34, John Hubbard wrote: >> On 10/17/19 9:27 PM, Viresh Kumar wrote: >>> On 17-10-19, 17:04, John Hubbard wrote: >>>> The following build warning occurred on powerpc 64-bit builds: >>>> >>&

[PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread John Hubbard
o Pmax capping at chip level") Cc: Shilpasri G Bhat Cc: Preeti U Murthy Cc: Viresh Kumar Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: John Hubbard --- Hi, I have only compile-tested this, so I would appreciate if anyone could do a b

Re: [PATCH V3] mm/page_alloc: Add alloc_contig_pages()

2019-10-17 Thread John Hubbard
ch/11190213/ Hi Anshuman, I'm having trouble finding a tree that this applies cleanly too, which one did you use? (latest linux-next, or linux.git would be nice). thanks, John Hubbard NVIDIA > > Changes in V3: > > - Added an in-code comment per Michal and David > >

[PATCH v2 0/2] gup.c, gup_benchmark.c trivial fixes before the storm

2019-10-14 Thread John Hubbard
Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Keith Busch Cc: Ira Weiny Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org John Hubbard (2): mm/gup_benchmark: add a missing "w" to getopt string mm/gup: fix a misnamed "write" argument, and a related bug mm/gup.

[PATCH v2 2/2] mm/gup: fix a misnamed "write" argument, and a related bug

2019-10-14 Thread John Hubbard
s: b798bec4741b ("mm/gup: change write parameter to flags in fast walk") Reported-by: kbuild test robot Suggested-by: Kirill A. Shutemov Suggested-by: Ira Weiny Cc: Christoph Hellwig Cc: Aneesh Kumar K.V Signed-off-by: John Hubbard --- mm/gup.c | 14 -- 1 file changed, 8 in

[PATCH v2 1/2] mm/gup_benchmark: add a missing "w" to getopt string

2019-10-14 Thread John Hubbard
k: invalid option -- 'w' ...which is fixed, with this commit. Acked-by: Kirill A. Shutemov Cc: Keith Busch Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: John Hubbard --- tools/testing/selftests/vm/gup_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 2/2] mm/gup: fix a misnamed "write" argument: should be "flags"

2019-10-13 Thread John Hubbard
also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/John-Hubbard/gup-c-gup_benchmark-c-trivial-fixes-before-the-storm/20191014-114158 config: powerpc-defconfig

[PATCH 0/2] gup.c, gup_benchmark.c trivial fixes before the storm

2019-10-13 Thread John Hubbard
l.org John Hubbard (2): mm/gup_benchmark: add a missing "w" to getopt string mm/gup: fix a misnamed "write" argument: should be "flags" mm/gup.c | 12 +++- tools/testing/selftests/vm/gup_benchmark.c | 2 +- 2 files ch

[PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string

2019-10-13 Thread John Hubbard
k: invalid option -- 'w' ...which is fixed, with this commit. Cc: Kirill A. Shutemov Cc: Keith Busch Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: John Hubbard --- tools/testing/selftests/vm/gup_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 2/2] mm/gup: fix a misnamed "write" argument: should be "flags"

2019-10-13 Thread John Hubbard
ssing "int" on pdshift. Cc: Christoph Hellwig Cc: Aneesh Kumar K.V Signed-off-by: John Hubbard --- mm/gup.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 23a9f9c9d377..0438221d8c53 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1973

Re: [PATCH v3 3/4] mm: don't expose non-hugetlb page to fast gup prematurely

2019-09-26 Thread John Hubbard
inc/dec before and after the gup_fast() irq disable/enable points: https://lore.kernel.org/r/20190920195047.7703-4-leona...@linux.ibm.com ...and that lead to noticing a general lack of barriers there. thanks, -- John Hubbard NVIDIA

Re: [PATCH v2 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing

2019-09-23 Thread John Hubbard
On 9/23/19 1:23 PM, Leonardo Bras wrote: > On Mon, 2019-09-23 at 12:58 -0700, John Hubbard wrote: >> >> CPU 0CPU 1 >> -- -- >>READ(p

Re: [PATCH 3/3] mm:fix gup_pud_range

2019-09-20 Thread John Hubbard
t; if (pud_none(pud)) > return 0; > + if (unlikely(!pud_present(pud))) > + return 0; If the MCE hwpoison behavior puts in swap entries, then it seems like all page table walkers would need to check for p*d_present(), and may

Re: [RFC] mm: Proactive compaction

2019-09-17 Thread John Hubbard
exactly are you triggering compaction? thanks, -- John Hubbard NVIDIA

Re: [PATCH] gpio: fix build failure: gpiochip_[un]lock*() static/non-static

2019-09-10 Thread John Hubbard
On 9/8/19 12:16 AM, Linus Walleij wrote: On Sat, Sep 7, 2019 at 2:05 AM John Hubbard wrote: While building with !CONFIG_GPIOLIB, I experienced a build failure, because driver.h in that configuration supplies both a static and a non-static version of these routines: I think this is fixed in

[PATCH] gpio: fix build failure: gpiochip_[un]lock*() static/non-static

2019-09-06 Thread John Hubbard
of CONFIG_GPIOLIB. Fixes: commit c7663fa2a663 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h") Cc: YueHaibing Cc: Linus Walleij Signed-off-by: John Hubbard --- Hi, This is for today's linux-next. More background: It *looks* like the original commit did correc

Re: [RFC PATCH v2 02/19] fs/locks: Add Exclusive flag to user Layout lease

2019-09-04 Thread John Hubbard
t to allow multiple processes to take FL_UNBREAKABLE leases on the same file/range, so that we can make RDMA setups reasonable. By "reasonable" I mean, "no need to have a lead process that owns all the leases". thanks, -- John Hubbard NVIDIA

Re: [PATCH] x86/boot: Fix regression--secure boot info loss from bootparam sanitizing

2019-09-01 Thread John Hubbard
t could not be determined". The efi_main function in arch/x86/boot/compressed/eboot.c sets this field early but it is subsequently zeroed by the above referenced commit in the file arch/x86/include/asm/bootparam_utils.h Applies to 5.3-rc6. Hi, The fix itself looks good, so you can add:

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

2019-08-28 Thread John Hubbard
ly FOLL_LONGTERM *does* require those callbacks. Because we've been, so far, equating FOLL_LONGTERM with the vaddr_pin struct and with a lease. What am I missing here? thanks, -- John Hubbard NVIDIA

Re: linux-next: Tree for Aug 23

2019-08-23 Thread John Hubbard
nt = NULL, *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

[tip: x86/urgent] x86/boot: Fix boot regression caused by bootparam sanitizing

2019-08-22 Thread tip-bot2 for John Hubbard
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 7846f58fba964af7cb8cf77d4d13c33254725211 Gitweb: https://git.kernel.org/tip/7846f58fba964af7cb8cf77d4d13c33254725211 Author:John Hubbard AuthorDate:Wed, 21 Aug 2019 12:25:13 -07:00

Re: [PATCH v2 0/3] mm/gup: introduce vaddr_pin_pages_remote(), FOLL_PIN

2019-08-22 Thread John Hubbard
On 8/22/19 5:24 PM, Ira Weiny wrote: > On Tue, Aug 20, 2019 at 09:07:24PM -0700, John Hubbard wrote: >> Hi Ira, >> >> This is for your tree. I'm dropping the RFC because this aspect is >> starting to firm up pretty well. >> >> I've moved FOLL

Re: Boot failure due to: x86/boot: Save fields explicitly, zero out everything else

2019-08-21 Thread John Hubbard
On 8/21/19 12:49 PM, Neil MacLeod wrote: The fix looks good - many thanks for the quick turnaround! Great news, and thanks for the bug report! thanks, -- John Hubbard NVIDIA On Wed, 21 Aug 2019 at 19:56, John Hubbard wrote: On 8/21/19 11:51 AM, Thomas Gleixner wrote: On Wed, 21 Aug

[PATCH] x86/boot: Fix boot failure regression

2019-08-21 Thread John Hubbard
ot: Save fields explicitly, zero out everything else") Reported-by: Neil MacLeod Suggested-by: Thomas Gleixner Cc: H. Peter Anvin Cc: sta...@vger.kernel.org Signed-off-by: John Hubbard --- arch/x86/include/asm/bootparam_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: Boot failure due to: x86/boot: Save fields explicitly, zero out everything else

2019-08-21 Thread John Hubbard
On 8/21/19 11:51 AM, Thomas Gleixner wrote: On Wed, 21 Aug 2019, John Hubbard wrote: On 8/21/19 10:05 AM, Neil MacLeod wrote: static void sanitize_boot_params(struct boot_params *boot_params) { ... const struct boot_params_to_save to_save

Re: Boot failure due to: x86/boot: Save fields explicitly, zero out everything else

2019-08-21 Thread John Hubbard
__u8 _pad8[48];/* 0xcd0 */ struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ __u8 _pad9[276]; /* 0xeec */ } __attribute__((packed)); thanks, -- John Hubbard NVIDIA The OS I'm testing is LibreELEC, which is a

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

2019-08-21 Thread John Hubbard
On 8/19/19 8:36 PM, Dave Chinner wrote: On Mon, Aug 19, 2019 at 08:09:33PM -0700, John Hubbard wrote: 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

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

2019-08-21 Thread John Hubbard
do that, it might make it a lot simpler to add lease support to drivers like XDP, which is otherwise looking pretty difficult to set up with an fd. (It's socket-based, and not immediately clear where to connect up the fd.) thanks, -- John Hubbard NVIDIA Why not just have a single table some

Boot failure due to: x86/boot: Save fields explicitly, zero out everything else

2019-08-21 Thread John Hubbard
bisect bad a90118c445cc7f07781de26a9684d4ec58bfcfd1 is the first bad commit commit a90118c445cc7f07781de26a9684d4ec58bfcfd1 Author: John Hubbard Date: Tue Jul 30 22:46:27 2019 -0700 x86/boot: Save fields explicitly, zero out everything else Recent gcc compilers (gcc 9.1) generate warnings about an out

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

2019-08-20 Thread John Hubbard
Cc: Vlastimil Babka Cc: Jan Kara Cc: Michal Hocko Cc: Ira Weiny Signed-off-by: John Hubbard --- drivers/infiniband/core/umem.c | 1 + include/linux/mm.h | 56 ++ mm/gup.c | 2 +- 3 files changed, 52 insertions(+), 7 deletions

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

2019-08-20 Thread John Hubbard
ned-off-by: John Hubbard Cc: Ira Weiny --- include/linux/mm.h | 5 + mm/gup.c | 34 ++ mm/process_vm_access.c | 23 +-- 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/include/linux/mm.h b/include/linux/

[PATCH v2 1/3] 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

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

2019-08-20 Thread John Hubbard
On 8/20/19 9:03 PM, John Hubbard wrote: commit 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var definition") causes the following warning when run on some patches: Please disregard this series. It's stale. thanks, -- John Hubbard NVIDIA

[PATCH v2 0/3] mm/gup: introduce vaddr_pin_pages_remote(), FOLL_PIN

2019-08-20 Thread John Hubbard
that there are a lot of references in comments and commit logs, to vaddr_pin_pages(). We'll want to catch all of those if we rename that. I am pushing pretty hard to rename it to vaddr_pin_user_pages(). v1 of this may be found here: https://lore.kernel.org/r/20190812015044.26176-1-jhubb...@n

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

2019-08-20 Thread John Hubbard
Cc: Michal Hocko 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

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

2019-08-20 Thread John Hubbard
ed] ... )/ 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
verted, 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 ++-

[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

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

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: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-19 Thread John Hubbard
;t play by the rules, it hangs in close() until it is killed. +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 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: [Linux-kernel-mentees][PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*()

2019-08-19 Thread John Hubbard
o review them, but make a note 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.

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: [RFC PATCH v2 2/3] mm/gup: introduce FOLL_PIN flag for get_user_pages()

2019-08-16 Thread John Hubbard
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-ID:X-Mailer: >

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-16 Thread John Hubbard
On 8/16/19 2:59 PM, Ira Weiny wrote: > On Fri, Aug 16, 2019 at 11:50:09AM -0700, John Hubbard wrote: ... >>> John could you send a formal patch using vaddr_pin* and I'll add it to the >>> tree? >>> >> >> Yes...hints about which struct file to use her

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-16 Thread John Hubbard
On 8/16/19 11:33 AM, Ira Weiny wrote: On Fri, Aug 16, 2019 at 05:41:08PM +0200, Jan Kara wrote: On Thu 15-08-19 19:14:08, John Hubbard wrote: On 8/15/19 10:41 AM, John Hubbard wrote: On 8/15/19 10:32 AM, Ira Weiny wrote: On Thu, Aug 15, 2019 at 03:35:10PM +0200, Jan Kara wrote: On Thu 15-08

[tip:x86/urgent] x86/boot: Save fields explicitly, zero out everything else

2019-08-16 Thread tip-bot for John Hubbard
Commit-ID: a90118c445cc7f07781de26a9684d4ec58bfcfd1 Gitweb: https://git.kernel.org/tip/a90118c445cc7f07781de26a9684d4ec58bfcfd1 Author: John Hubbard AuthorDate: Tue, 30 Jul 2019 22:46:27 -0700 Committer: Thomas Gleixner CommitDate: Fri, 16 Aug 2019 14:20:00 +0200 x86/boot: Save fields

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-15 Thread John Hubbard
On 8/15/19 10:41 AM, John Hubbard wrote: > On 8/15/19 10:32 AM, Ira Weiny wrote: >> On Thu, Aug 15, 2019 at 03:35:10PM +0200, Jan Kara wrote: >>> On Thu 15-08-19 15:26:22, Jan Kara wrote: >>>> On Wed 14-08-19 20:01:07, John Hubbard wrote: >>>>> On 8

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-15 Thread John Hubbard
On 8/15/19 10:32 AM, Ira Weiny wrote: > On Thu, Aug 15, 2019 at 03:35:10PM +0200, Jan Kara wrote: >> On Thu 15-08-19 15:26:22, Jan Kara wrote: >>> On Wed 14-08-19 20:01:07, John Hubbard wrote: >>>> On 8/14/19 5:02 PM, John Hubbard wrote: >>>> >>>

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-14 Thread John Hubbard
On 8/14/19 5:02 PM, John Hubbard wrote: On 8/14/19 4:50 PM, Ira Weiny wrote: On Tue, Aug 13, 2019 at 05:56:31PM -0700, John Hubbard wrote: On 8/13/19 5:51 PM, John Hubbard wrote: On 8/13/19 2:08 PM, Ira Weiny wrote: On Mon, Aug 12, 2019 at 05:07:32PM -0700, John Hubbard wrote: On 8/12/19 4

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-14 Thread John Hubbard
On 8/14/19 4:50 PM, Ira Weiny wrote: On Tue, Aug 13, 2019 at 05:56:31PM -0700, John Hubbard wrote: On 8/13/19 5:51 PM, John Hubbard wrote: On 8/13/19 2:08 PM, Ira Weiny wrote: On Mon, Aug 12, 2019 at 05:07:32PM -0700, John Hubbard wrote: On 8/12/19 4:49 PM, Ira Weiny wrote: On Sun, Aug 11

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-13 Thread John Hubbard
On 8/13/19 5:51 PM, John Hubbard wrote: > On 8/13/19 2:08 PM, Ira Weiny wrote: >> On Mon, Aug 12, 2019 at 05:07:32PM -0700, John Hubbard wrote: >>> On 8/12/19 4:49 PM, Ira Weiny wrote: >>>> On Sun, Aug 11, 2019 at 06:50:44PM -0700, john.hubb...@gmail.com w

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-13 Thread John Hubbard
On 8/13/19 2:08 PM, Ira Weiny wrote: > On Mon, Aug 12, 2019 at 05:07:32PM -0700, John Hubbard wrote: >> On 8/12/19 4:49 PM, Ira Weiny wrote: >>> On Sun, Aug 11, 2019 at 06:50:44PM -0700, john.hubb...@gmail.com wrote: >>>> From: John Hubbard >> ... >>>

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-13 Thread John Hubbard
vaddr_pin_user_pages() ...which also sounds close enough to get_user_pages() that a bit of history and continuity is preserved, too. thanks, -- John Hubbard NVIDIA

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-12 Thread John Hubbard
On 8/12/19 4:49 PM, Ira Weiny wrote: On Sun, Aug 11, 2019 at 06:50:44PM -0700, john.hubb...@gmail.com wrote: From: John Hubbard ... diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 53085896d718..fdff034a8a30 100644 --- a/drivers/infiniband/core

Re: [RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-12 Thread John Hubbard
On 8/12/19 3:03 PM, Ira Weiny wrote: > On Sun, Aug 11, 2019 at 06:50:44PM -0700, john.hubb...@gmail.com wrote: >> From: John Hubbard ... >> +/** >> + * vaddr_pin_pages pin pages by virtual address and return the pages to the > > vaddr_pin_pages_remote >

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-12 Thread John Hubbard
On 8/12/19 2:00 PM, Ira Weiny wrote: On Fri, Aug 09, 2019 at 05:09:54PM -0700, John Hubbard wrote: On 8/9/19 3:58 PM, ira.we...@intel.com wrote: From: Ira Weiny ... At one point I wanted to (and had in my tree) a new flag but I went away from it. Prior to the discussion on mlock last week

[RFC PATCH 2/2] mm/gup: introduce vaddr_pin_pages_remote()

2019-08-11 Thread john . hubbard
From: John Hubbard This is the "vaddr_pin_pages" corresponding variant to get_user_pages_remote(), but with FOLL_PIN semantics: the implementation sets FOLL_PIN. That, in turn, means that the pages must ultimately be released by put_user_page*()--typically, via vaddr_unpin_pages*().

[RFC PATCH 0/2] mm/gup: introduce vaddr_pin_pages_remote(), FOLL_PIN

2019-08-11 Thread john . hubbard
From: John Hubbard Hi, Dave Chinner's head didn't seem to explode...much, when he saw Ira's series, so I optimistically started taking it from there...this builds on top of Ira's patchset that he just sent out: "[RFC PATCH v2 00/19] RDMA/FS DAX truncate prop

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

2019-08-11 Thread john . hubbard
From: John Hubbard FOLL_PIN is set by vaddr_pin_pages(). This is different than FOLL_LONGTERM, because even short term page pins need a new kind of tracking, if those pinned pages' data is going to potentially be modified. This situation is described in more detail in commit fc1d8e7cca2d

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-11 Thread John Hubbard
eturn the pages to the > + * user. > + * > + * @addr, start address > + * @nr_pages, number of pages to pin > + * @gup_flags, flags to use for the pin > + * @pages, array of pages returned > + * @vaddr_pin, initalized meta information this pin is to be associated Typo: initialized thanks, -- John Hubbard NVIDIA

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

2019-08-11 Thread john . hubbard
From: John Hubbard commit 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var definition") causes the following warning when run on some patches: Unescaped left brace in regex is passed through in regex; marked by < --HERE in m/(?: ... [238 lines of appalling perl output, m

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

2019-08-11 Thread john . hubbard
From: John Hubbard Hi, This happens on today's linux-next. If the commit message of the original patch were just a bit clearer, I might have been able to attempt a fix, instead of a revert, but so far, both the Perl and the English are beyond me. And we can't leave checkpatch broken

Re: [RFC PATCH v2 12/19] mm/gup: Prep put_user_pages() to take an vaddr_pin struct

2019-08-09 Thread John Hubbard
; > > /** > @@ -102,15 +162,7 @@ EXPORT_SYMBOL(put_user_pages_dirty_lock); > */ > void put_user_pages(struct page **pages, unsigned long npages) > { > - unsigned long index; > - > - /* > - * TODO: this can be optimized for huge pages: if a series of pages is > - * physically contiguous and part of the same compound page, then a > - * single operation to the head page should suffice. > - */ > - for (index = 0; index < npages; index++) > - put_user_page(pages[index]); > + __put_user_pages(NULL, pages, npages); > } > EXPORT_SYMBOL(put_user_pages); > > This all looks pretty good, so regardless of the outcome of the minor points above, Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA

Re: [RFC PATCH v2 11/19] mm/gup: Pass follow_page_context further down the call stack

2019-08-09 Thread John Hubbard
#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long > addr, > + pmd_t *pmd, int flags, struct follow_page_context *ctx); > +struct page *follow_devmap_pud(struct vm_area_struct *vma, unsigned long > addr, > + pud_t *pud, int flags, struct follow_page_context *ctx); > +#else > +static inline struct page *follow_devmap_pmd(struct vm_area_struct *vma, > + unsigned long addr, pmd_t *pmd, int flags, > + struct follow_page_context *ctx) > +{ > + return NULL; > +} > + > +static inline struct page *follow_devmap_pud(struct vm_area_struct *vma, > + unsigned long addr, pud_t *pud, int flags, > + struct follow_page_context *ctx) > +{ > + return NULL; > +} > +#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ > + > + > /* > * The set of flags that only affect watermark checking and reclaim > * behaviour. This is used by the MM to obey the caller constraints > thanks, -- John Hubbard NVIDIA

Re: [RFC PATCH v2 15/19] mm/gup: Introduce vaddr_pin_pages()

2019-08-09 Thread John Hubbard
proper > + * tracking. > + */ > +void vaddr_unpin_pages_dirty_lock(struct page **pages, unsigned long > nr_pages, > + struct vaddr_pin *vaddr_pin, bool make_dirty) > +{ > + __put_user_pages_dirty_lock(vaddr_pin, pages, nr_pages, make_dirty); > +} > +EXPORT_SYMBOL(vaddr_unpin_pages_dirty_lock); > OK, whew, I'm glad to see the updated _dirty_lock() API used here. :) thanks, -- John Hubbard NVIDIA

Re: [RFC PATCH v2 10/19] mm/gup: Pass a NULL vaddr_pin through GUP fast

2019-08-09 Thread John Hubbard
ry within > the address range. > Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > Signed-off-by: Ira Weiny > --- > mm/gup.c | 65 ++-- > 1 file changed, 40 insertions(+), 25 deletions(-) > > diff --git a/m

Re: [RFC PATCH v2 09/19] mm/gup: Introduce vaddr_pin structure

2019-08-09 Thread John Hubbard
ooks good, although you may want to combine it with the next patch. Otherwise it feels like a "to be continued" when you're reading them. Either way, though: Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > diff --git a/include/linux/mm.h b/include/linux/mm.h >

Re: [PATCH 1/3] mm/mlock.c: convert put_page() to put_user_page*()

2019-08-09 Thread John Hubbard
On 8/9/19 11:14 AM, Weiny, Ira wrote: On Fri 09-08-19 15:58:13, Jan Kara wrote: On Fri 09-08-19 10:23:07, Michal Hocko wrote: On Fri 09-08-19 10:12:48, Vlastimil Babka wrote: On 8/9/19 12:59 AM, John Hubbard wrote: ... In principle, I'm not strongly opposed to a new FOLL flag to dete

Re: [Linux-kernel-mentees][PATCH v4 1/1] sgi-gru: Remove *pte_lookup functions

2019-08-09 Thread John Hubbard
On 8/9/19 2:44 AM, Bharath Vedartham wrote: On Thu, Aug 08, 2019 at 04:21:44PM -0700, John Hubbard wrote: On 8/8/19 11:55 AM, Bharath Vedartham wrote: ... static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr, int write, int atomic, unsigned long *gpa, int

Re: [PATCH 1/3] mm/mlock.c: convert put_page() to put_user_page*()

2019-08-09 Thread John Hubbard
On 8/9/19 1:23 AM, Michal Hocko wrote: On Fri 09-08-19 10:12:48, Vlastimil Babka wrote: On 8/9/19 12:59 AM, John Hubbard wrote: That's true. However, I'm not sure munlocking is where the put_user_page() machinery is intended to be used anyway? These are short-term pins for s

[PATCH] fs/ceph: use release_pages() directly

2019-08-08 Thread john . hubbard
From: John Hubbard release_pages() has been available to modules since Oct, 2010, when commit 0be8557bcd34 ("fuse: use release_pages()") added EXPORT_SYMBOL(release_pages). However, this ceph code was still using a workaround. Remove the workaround, and call release_pages() directly.

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