lkml.org 
[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC 4/4] Change mmap_sem to range lock
Date
Laurent Dufour <ldufour@linux.vnet.ibm.com> writes:

> [resent this patch which seems to have not reached the mailing lists]
>
> Change the mmap_sem to a range lock to allow finer grain locking on
> the memory layout of a task.
>
> This patch rename mmap_sem into mmap_rw_tree to avoid confusion and
> replace any locking (read or write) by complete range locking. So
> there is no functional change except in the way the underlying locking
> is achieved.
>
> Currently, this patch only supports x86 and PowerPc architectures,
> furthermore it should break the build of any others.

Thanks for working on this.

However as commented before I think the first step to make progress here
is a description of everything mmap_sem protects.

Surely the init full case could be done shorter with some wrapper
that combines the init_full and lock operation?

Then it would be likely a simple search'n'replace to move the
whole tree in one atomic step to the new wrappers.
Initially they could be just defined to use rwsems too to
not change anything at all.

It would be a good idea to merge such a patch as quickly
as possible beause it will be a nightmare to maintain
longer term.

Then you could add a config to use a range lock through
the wrappers.

Then after that you could add real ranges step by step,
after doing the proper analysis.

-Andi

\
 
 \ /
  Last update: 2017-04-21 01:37    [W:0.156 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site