Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-20 Thread Jason Gunthorpe
On Tue, May 19, 2020 at 07:39:30PM -0700, Michel Lespinasse wrote: > > > I think this assertion should be deleted from this driver. It's there > > > in case get_user_pages_fast() takes the mmap sem. It would make sense to > > > have this assertion in get_user_pages_fast() in case we take the

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-20 Thread Michel Lespinasse
On Wed, May 20, 2020 at 12:32 AM John Hubbard wrote: > On 2020-05-19 19:39, Michel Lespinasse wrote: > >> That gives you additional options inside internal_get_user_pages_fast(), > >> such > >> as, approximately: > >> > >> if (!(gup_flags & FOLL_FAST_ONLY)) > >>

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-20 Thread John Hubbard
On 2020-05-19 19:39, Michel Lespinasse wrote: ... That gives you additional options inside internal_get_user_pages_fast(), such as, approximately: if (!(gup_flags & FOLL_FAST_ONLY)) might_lock_read(>mm->mmap_lock); ...not that that is necessarily a great idea, seeing as how it merely

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread Michel Lespinasse
On Tue, May 19, 2020 at 11:15 AM John Hubbard wrote: > On 2020-05-19 08:32, Matthew Wilcox wrote: > > On Tue, May 19, 2020 at 03:20:40PM +0200, Laurent Dufour wrote: > >> Le 19/05/2020 à 15:10, Michel Lespinasse a écrit : > >>> On Mon, May 18, 2020 at 03:45:22PM +0200, Laurent Dufour wrote: >

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread John Hubbard
On 2020-05-19 08:32, Matthew Wilcox wrote: On Tue, May 19, 2020 at 03:20:40PM +0200, Laurent Dufour wrote: Le 19/05/2020 à 15:10, Michel Lespinasse a écrit : On Mon, May 18, 2020 at 03:45:22PM +0200, Laurent Dufour wrote: Le 24/04/2020 à 03:39, Michel Lespinasse a écrit : Rename the mmap_sem

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread Matthew Wilcox
On Tue, May 19, 2020 at 03:20:40PM +0200, Laurent Dufour wrote: > Le 19/05/2020 à 15:10, Michel Lespinasse a écrit : > > On Mon, May 18, 2020 at 03:45:22PM +0200, Laurent Dufour wrote: > > > Le 24/04/2020 à 03:39, Michel Lespinasse a écrit : > > > > Rename the mmap_sem field to mmap_lock. Any new

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread Laurent Dufour
Le 19/05/2020 à 15:10, Michel Lespinasse a écrit : On Mon, May 18, 2020 at 03:45:22PM +0200, Laurent Dufour wrote: Le 24/04/2020 à 03:39, Michel Lespinasse a écrit : Rename the mmap_sem field to mmap_lock. Any new uses of this lock should now go through the new mmap locking api. The mmap_lock

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread Michel Lespinasse
On Mon, May 18, 2020 at 01:07:26PM +0200, Vlastimil Babka wrote: > Any plan about all the code comments mentioning mmap_sem? :) Not urgent. It's mostly a sed job, I'll add it in the next version as it seems the patchset is getting ready for inclusion. -- Michel "Walken" Lespinasse A program is

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-19 Thread Michel Lespinasse
On Mon, May 18, 2020 at 03:45:22PM +0200, Laurent Dufour wrote: > Le 24/04/2020 à 03:39, Michel Lespinasse a écrit : > > Rename the mmap_sem field to mmap_lock. Any new uses of this lock > > should now go through the new mmap locking api. The mmap_lock is > > still implemented as a rwsem, though

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-18 Thread Laurent Dufour
Le 24/04/2020 à 03:39, Michel Lespinasse a écrit : Rename the mmap_sem field to mmap_lock. Any new uses of this lock should now go through the new mmap locking api. The mmap_lock is still implemented as a rwsem, though this could change in the future. Signed-off-by: Michel Lespinasse ---

Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock

2020-05-18 Thread Vlastimil Babka
On 4/24/20 3:39 AM, Michel Lespinasse wrote: > Rename the mmap_sem field to mmap_lock. Any new uses of this lock > should now go through the new mmap locking api. The mmap_lock is > still implemented as a rwsem, though this could change in the future. > > Signed-off-by: Michel Lespinasse Except