The patch titled Subject: uprobes: share the i_mmap_rwsem has been added to the -mm tree. Its filename is uprobes-share-the-i_mmap_rwsem.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/uprobes-share-the-i_mmap_rwsem.patch echo and later at echo http://ozlabs.org/~akpm/mmotm/broken-out/uprobes-share-the-i_mmap_rwsem.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Davidlohr Bueso <dave@xxxxxxxxxxxx> Subject: uprobes: share the i_mmap_rwsem Both register and unregister call build_map_info() in order to create the list of mappings before installing or removing breakpoints for every mm which maps file backed memory. As such, there is no reason to hold the i_mmap_rwsem exclusively, so share it and allow concurrent readers to build the mapping data. Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx> Acked-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN kernel/events/uprobes.c~uprobes-share-the-i_mmap_rwsem kernel/events/uprobes.c --- a/kernel/events/uprobes.c~uprobes-share-the-i_mmap_rwsem +++ a/kernel/events/uprobes.c @@ -724,7 +724,7 @@ build_map_info(struct address_space *map int more = 0; again: - i_mmap_lock_write(mapping); + i_mmap_lock_read(mapping); vma_interval_tree_foreach(vma, &mapping->i_mmap, pgoff, pgoff) { if (!valid_vma(vma, is_register)) continue; @@ -755,7 +755,7 @@ build_map_info(struct address_space *map info->mm = vma->vm_mm; info->vaddr = offset_to_vaddr(vma, offset); } - i_mmap_unlock_write(mapping); + i_mmap_unlock_read(mapping); if (!more) goto out; _ Patches currently in -mm which might be from dave@xxxxxxxxxxxx are mmfs-introduce-helpers-around-the-i_mmap_mutex.patch mm-use-new-helper-functions-around-the-i_mmap_mutex.patch mm-convert-i_mmap_mutex-to-rwsem.patch mm-rmap-share-the-i_mmap_rwsem.patch uprobes-share-the-i_mmap_rwsem.patch mm-xip-share-the-i_mmap_rwsem.patch mm-memory-failure-share-the-i_mmap_rwsem.patch mm-nommu-share-the-i_mmap_rwsem.patch ipc-semc-chance-memory-barrier-in-sem_lock-to-smp_rmb.patch ipc-semc-chance-memory-barrier-in-sem_lock-to-smp_rmb-fix.patch ipc-semc-chance-memory-barrier-in-sem_lock-to-smp_rmb-fix-fix.patch ipc-semc-increase-semmsl-semmni-semopm.patch ipc-msg-increase-msgmni-remove-scaling.patch ipc-msg-increase-msgmni-remove-scaling-checkpatch-fixes.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html