From: Davidlohr Bueso <dave@stgolabs.net>
To: akpm@linux-foundation.org
Cc: dledford@redhat.com, jgg@mellanox.com,
linux-rdma@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next 0/6] mm: make pinned_vm atomic and simplify users
Date: Tue, 15 Jan 2019 10:18:31 -0800 [thread overview]
Message-ID: <20190115181831.4zgrvyfjy2re7t43@linux-r8p5> (raw)
In-Reply-To: <20190115181300.27547-1-dave@stgolabs.net>
Also Ccing lkml, sorry.
On Tue, 15 Jan 2019, Davidlohr Bueso wrote:
>Hi,
>
>The following patches aim to provide cleanups to users that pin pages
>(mostly infiniband) by converting the counter to atomic -- note that
>Daniel Jordan also has patches[1] for the locked_vm counterpart and vfio.
>
>Apart from removing a source of mmap_sem writer, we benefit in that
>we can get rid of a lot of code that defers work when the lock cannot
>be acquired, as well as drivers avoiding mmap_sem altogether by also
>converting gup to gup_fast() and letting the mm handle it. Users
>that do the gup_longterm() remain of course under at least reader mmap_sem.
>
>Everything has been compile-tested _only_ so I hope I didn't do anything
>too stupid. Please consider for v5.1.
>
>On a similar topic and potential follow up, it would be nice to resurrect
>Peter's VM_PINNED idea in that the broken semantics that occurred after
>bc3e53f682 ("mm: distinguish between mlocked and pinned pages") are still
>present. Also encapsulating internal mm logic via mm[un]pin() instead of
>drivers having to know about internals and playing nice with compaction are
>all wins.
>
>Thanks!
>
>[1] https://lkml.org/lkml/2018/11/5/854
>
>Davidlohr Bueso (6):
> mm: make mm->pinned_vm an atomic counter
> mic/scif: do not use mmap_sem
> drivers/IB,qib: do not use mmap_sem
> drivers/IB,hfi1: do not se mmap_sem
> drivers/IB,usnic: reduce scope of mmap_sem
> drivers/IB,core: reduce scope of mmap_sem
>
> drivers/infiniband/core/umem.c | 47 +++-----------------
> drivers/infiniband/hw/hfi1/user_pages.c | 12 ++---
> drivers/infiniband/hw/qib/qib_user_pages.c | 69 ++++++++++-------------------
> drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 -
> drivers/infiniband/hw/usnic/usnic_uiom.c | 56 +++--------------------
> drivers/infiniband/hw/usnic/usnic_uiom.h | 1 -
> drivers/misc/mic/scif/scif_rma.c | 38 +++++-----------
> fs/proc/task_mmu.c | 2 +-
> include/linux/mm_types.h | 2 +-
> kernel/events/core.c | 8 ++--
> kernel/fork.c | 2 +-
> mm/debug.c | 3 +-
> 12 files changed, 57 insertions(+), 185 deletions(-)
>
>--
>2.16.4
>
next prev parent reply other threads:[~2019-01-15 18:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 18:12 Davidlohr Bueso
2019-01-15 18:12 ` [PATCH 1/6] mm: make mm->pinned_vm an atomic counter Davidlohr Bueso
2019-01-15 20:28 ` Ira Weiny
2019-01-15 18:12 ` [PATCH 3/6] drivers/IB,qib: do not use mmap_sem Davidlohr Bueso
2019-01-15 20:29 ` Ira Weiny
2019-01-15 18:12 ` [PATCH 4/6] drivers/IB,hfi1: do not se mmap_sem Davidlohr Bueso
2019-01-15 20:29 ` Ira Weiny
2019-01-15 18:12 ` [PATCH 5/6] drivers/IB,usnic: reduce scope of mmap_sem Davidlohr Bueso
2019-01-15 20:30 ` Ira Weiny
2019-01-17 23:41 ` Parvi Kaustubhi (pkaustub)
2019-01-15 18:13 ` [PATCH 6/6] drivers/IB,core: " Davidlohr Bueso
2019-01-15 20:30 ` Ira Weiny
2019-01-15 20:53 ` Jason Gunthorpe
2019-01-15 21:12 ` Matthew Wilcox
2019-01-15 21:17 ` Jason Gunthorpe
2019-01-16 16:00 ` Davidlohr Bueso
2019-01-16 17:02 ` Jason Gunthorpe
2019-01-16 17:06 ` Matthew Wilcox
2019-01-16 17:29 ` Jason Gunthorpe
2019-01-15 18:18 ` Davidlohr Bueso [this message]
[not found] ` <20190115181300.27547-3-dave@stgolabs.net>
2019-01-15 20:28 ` [PATCH 2/6] mic/scif: do not use mmap_sem Ira Weiny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190115181831.4zgrvyfjy2re7t43@linux-r8p5 \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox