Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1355858 > unrolled thread

Re: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for write killable

Started byVlastimil Babka <vbabka@suse.cz>
First post2016-03-11 13:00 +0100
Last post2016-03-11 13:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for  write killable Vlastimil Babka <vbabka@suse.cz> - 2016-03-11 13:00 +0100
    Re: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for  write killable Michal Hocko <mhocko@kernel.org> - 2016-03-11 13:50 +0100

#1355858 — Re: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for write killable

FromVlastimil Babka <vbabka@suse.cz>
Date2016-03-11 13:00 +0100
SubjectRe: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for write killable
Message-ID<rbtTB-5I7-27@gated-at.bofh.it>
On 03/11/2016 12:32 PM, Vlastimil Babka wrote:
> On 02/29/2016 02:26 PM, Michal Hocko wrote:
>> From: Michal Hocko <mhocko@suse.com>
>>
>> coredump_wait waits for mmap_sem for write currently which can
>> prevent oom_reaper to reclaim the oom victims address space
>> asynchronously because that requires mmap_sem for read. This might
>> happen if the oom victim is multi threaded and some thread(s) is
>> holding mmap_sem for read (e.g. page fault) and it is stuck in
>> the page allocator while other thread(s) reached coredump_wait
>> already.
>>
>> This patch simply uses down_write_killable and bails out with EINTR
>> if the lock got interrupted by the fatal signal. do_coredump will
>> return right away and do_group_exit will take care to zap the whole
>> thread group.
>>
>> Cc: Oleg Nesterov <oleg@redhat.com>
>> Signed-off-by: Michal Hocko <mhocko@suse.com>
>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>

Forgot to point out typo in Subject which makes it hard to grep for mmap_sem

[toc] | [next] | [standalone]


#1355884

FromMichal Hocko <mhocko@kernel.org>
Date2016-03-11 13:50 +0100
Message-ID<rbuFZ-6nv-15@gated-at.bofh.it>
In reply to#1355858
On Fri 11-03-16 12:54:17, Vlastimil Babka wrote:
> On 03/11/2016 12:32 PM, Vlastimil Babka wrote:
> >On 02/29/2016 02:26 PM, Michal Hocko wrote:
> >>From: Michal Hocko <mhocko@suse.com>
> >>
> >>coredump_wait waits for mmap_sem for write currently which can
> >>prevent oom_reaper to reclaim the oom victims address space
> >>asynchronously because that requires mmap_sem for read. This might
> >>happen if the oom victim is multi threaded and some thread(s) is
> >>holding mmap_sem for read (e.g. page fault) and it is stuck in
> >>the page allocator while other thread(s) reached coredump_wait
> >>already.
> >>
> >>This patch simply uses down_write_killable and bails out with EINTR
> >>if the lock got interrupted by the fatal signal. do_coredump will
> >>return right away and do_group_exit will take care to zap the whole
> >>thread group.
> >>
> >>Cc: Oleg Nesterov <oleg@redhat.com>
> >>Signed-off-by: Michal Hocko <mhocko@suse.com>
> >
> >Acked-by: Vlastimil Babka <vbabka@suse.cz>
> 
> Forgot to point out typo in Subject which makes it hard to grep for mmap_sem

Fixed and thanks!

-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web