]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/madvise: remove redundant mmap_lock operations from process_madvise()
authorSeongJae Park <sj@kernel.org>
Thu, 6 Feb 2025 06:15:17 +0000 (22:15 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 00:59:47 +0000 (16:59 -0800)
commit0d220e36bdbadb6923afc62fd3e15918494ff589
tree7130ee51bec003f3321c00c1711583f9d80bea6a
parent22f753a6148756a9e7ce7630f45965b10cec130b
mm/madvise: remove redundant mmap_lock operations from process_madvise()

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.

Link: https://lkml.kernel.org/r/20250206061517.2958-5-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Liam R. Howlett <howlett@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c