From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752274AbcCKLyd (ORCPT ); Fri, 11 Mar 2016 06:54:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:34572 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbcCKLyX (ORCPT ); Fri, 11 Mar 2016 06:54:23 -0500 Subject: Re: [PATCH 11/18] coredump: make coredump_wait wait for mma_sem for write killable To: Michal Hocko , LKML References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-12-git-send-email-mhocko@kernel.org> <56E2ACE7.50008@suse.cz> Cc: Andrew Morton , linux-mm@kvack.org, Alex Deucher , Alex Thorlton , Andrea Arcangeli , Andy Lutomirski , Benjamin LaHaise , =?UTF-8?Q?Christian_K=c3=b6nig?= , Daniel Vetter , Dave Hansen , David Airlie , Davidlohr Bueso , David Rientjes , "H . Peter Anvin" , Hugh Dickins , Ingo Molnar , Johannes Weiner , "Kirill A . Shutemov" , Konstantin Khlebnikov , linux-arch@vger.kernel.org, Mel Gorman , Oleg Nesterov , Peter Zijlstra , Petr Cermak , Thomas Gleixner , Michal Hocko From: Vlastimil Babka Message-ID: <56E2B1E9.90201@suse.cz> Date: Fri, 11 Mar 2016 12:54:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56E2ACE7.50008@suse.cz> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/11/2016 12:32 PM, Vlastimil Babka wrote: > On 02/29/2016 02:26 PM, Michal Hocko wrote: >> From: Michal Hocko >> >> 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 >> Signed-off-by: Michal Hocko > > Acked-by: Vlastimil Babka Forgot to point out typo in Subject which makes it hard to grep for mmap_sem