change mmap_sem taken for write killable v2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest18 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | mm: Make mmap_sem for write waits killable for mm syscallsmm/ mm/ mm/ +5 more | +55 | 0 replies | |
| 2/18 | mm: make vm_mmap killableinclude/ mm/ mm/ +2 more | +8 | 0 replies | |
| 3/18 | mm: make vm_munmap killablemm/ | +3 | 0 replies | |
| 4/18 | mm, aout: handle vm_brk failuresarch/ fs/ | +23 | 0 replies | |
| 5/18 | mm, elf: handle vm_brk errorfs/ | +5 | 0 replies | |
| 6/18 | mm: make vm_brk killableinclude/ mm/ | +4 | 0 replies | |
| 7/18 | mm, proc: make clear_refs killablefs/ | +9 | 0 replies | |
| 8/18 | mm, fork: make dup_mmap wait for mmap_sem for write killablekernel/ | +5 | 0 replies | |
| 9/18 | ipc, shm: make shmem attach/detach wait for mmap_sem killableipc/ | +7 | 0 replies | |
| 10/18 | vdso: make arch_setup_additional_pages wait for mmap_sem for write killablearch/ arch/ arch/ +6 more | +21 | 0 replies | |
| 11/18 | coredump: make coredump_wait wait for mmap_sem for write killablefs/ | +3 | 0 replies | |
| 12/18 | aio: make aio_setup_ring killablefs/ | +6 | 0 replies | |
| 13/18 | exec: make exec path waiting for mmap_sem killablefs/ | +8 | 0 replies | |
| 14/18 | prctl: make PR_SET_THP_DISABLE wait for mmap_sem killablekernel/ | +2 | 1 reply | |
| 15/18 | uprobes: wait for mmap_sem for write killablekernel/ | +5 | 0 replies | |
| 16/18 | drm/i915: make i915_gem_mmap_ioctl wait for mmap_sem killabledrivers/ | +4 | 0 replies | |
| 17/18 | drm/radeon: make radeon_mn_get wait for mmap_sem killabledrivers/ | +3 | 0 replies | |
| 18/18 | drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killabledrivers/ | +4 | 0 replies |
Reviews trailers per patch
17 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Vlastimil Babka | Andy Lutomirski | Oleg Nesterov | Davidlohr Bueso | Jeff Moyer | Christian König | Alex Thorlton |
|---|---|---|---|---|---|---|---|
| 1/18 | A-b | ||||||
| 2/18 | A-b | ||||||
| 3/18 | |||||||
| 4/18 | A-b | ||||||
| 5/18 | A-b | ||||||
| 6/18 | A-b | ||||||
| 7/18 | A-b | A-b | |||||
| 8/18 | A-b | ||||||
| 9/18 | A-b | A-b | |||||
| 10/18 | A-b | A-b | |||||
| 11/18 | A-b | A-b | |||||
| 12/18 | A-b | A-b | |||||
| 13/18 | A-b | A-b | |||||
| 14/18 | A-b | A-b | |||||
| 15/18 | A-b | A-b | |||||
| 16/18 | A-b | ||||||
| 17/18 | A-b | R-b | |||||
| 18/18 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.
Cover letter [PATCH 0/18] change mmap_sem taken for write killable v2
Hi,
The previous version of the series was posted here [0]. There were no large changes since then. I have rebased the series on top of the current linux-next (next-20160426) and added few clarifications based on the review feedback and acks/reviewed-by.
This is a follow up work for oom_reaper [1]. As the async OOM killing depends on oom_sem for read we would really appreciate if a holder for write didn't stood in the way. This patchset is changing many of down_write calls to be killable to help those cases when the writer is blocked and waiting for readers to release the lock and so help __oom_reap_task to process the oom victim.
Most of the patches are really trivial because the lock is help from a shallow syscall paths where we can return EINTR trivially and allow the current task to die (note that EINTR will never get to the userspace as the task has fatal signal pending). Others seem to be easy as well as the callers are already handling fatal errors and bail and return to userspace which should be sufficient to handle the failure gracefully. I am not familiar with all those code paths so a deeper review is really appreciated.
As this work is touching more areas which are not directly connected I have tried to keep the CC list as small as possible and people who I believed would be familiar are CCed only to the specific patches (all should have received the cover though).
This patchset is based on linux-next and it depends on down_write_killable for rw_semaphores which got merged into tip locking/rwsem branch and it is merged into this next tree. I guess it would be easiest to route these patches via mmotm because of the dependency on the tip tree but if respective maintainers prefer other way I have no objections.
I haven't covered all the mmap_write(mm->mmap_sem) instances here
$ git grep "down_write(.*\<mmap_sem\>)" next/master | wc -l 98 $ git grep "down_write(.*\<mmap_sem\>)" | wc -l 62
I have tried to cover those which should be relatively easy to review in this series because this alone should be a nice improvement. Other places can be changed on top.
Any feedback is highly appreciated.
---
[0] http://lkml.kernel.org/r/[email protected]
[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>