On Thu, Jan 16, 2025 at 05:30:58PM -0800, SeongJae Park wrote:
Optimize redundant mmap lock operations from process_madvise() by
directly doing the mmap locking first, and then the remaining works for
all ranges in the loop.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
I wonder if this might increase lock contention because now all of the
vector operations will hold the relevant mm lock without releasing after
each operation?
Probably it's ok given limited size of iov, but maybe in future we'd want
to set a limit on the ranges before we drop/reacquire lock?