From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlastimil Babka Subject: Re: [PATCH 10/18] vdso: make arch_setup_additional_pages wait for mmap_sem for write killable Date: Fri, 11 Mar 2016 12:28:14 +0100 Message-ID: <56E2ABCE.5070205@suse.cz> References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-11-git-send-email-mhocko@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de ([195.135.220.15]:58143 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbcCKL2T (ORCPT ); Fri, 11 Mar 2016 06:28:19 -0500 In-Reply-To: <1456752417-9626-11-git-send-email-mhocko@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Michal Hocko , LKML 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 Pe On 02/29/2016 02:26 PM, Michal Hocko wrote: > From: Michal Hocko > > most architectures are relying on mmap_sem for write in their > arch_setup_additional_pages. If the waiting task gets killed by the oom > killer it would block oom_reaper from asynchronous address space reclaim > and reduce the chances of timely OOM resolving. Wait for the lock in > the killable mode and return with EINTR if the task got killed while > waiting. > > Cc: linux-arch@vger.kernel.org > Cc: Andy Lutomirski > Signed-off-by: Michal Hocko I don't have much arch-specific insight, but looks OK. Acked-by: Vlastimil Babka From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:58143 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbcCKL2T (ORCPT ); Fri, 11 Mar 2016 06:28:19 -0500 Subject: Re: [PATCH 10/18] vdso: make arch_setup_additional_pages wait for mmap_sem for write killable References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-11-git-send-email-mhocko@kernel.org> From: Vlastimil Babka Message-ID: <56E2ABCE.5070205@suse.cz> Date: Fri, 11 Mar 2016 12:28:14 +0100 MIME-Version: 1.0 In-Reply-To: <1456752417-9626-11-git-send-email-mhocko@kernel.org> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Michal Hocko , LKML 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 Message-ID: <20160311112814.MGk24TiNG8DnI-CcJgeXIuNhDkTZ0vd_6vcJaw4nh8E@z> On 02/29/2016 02:26 PM, Michal Hocko wrote: > From: Michal Hocko > > most architectures are relying on mmap_sem for write in their > arch_setup_additional_pages. If the waiting task gets killed by the oom > killer it would block oom_reaper from asynchronous address space reclaim > and reduce the chances of timely OOM resolving. Wait for the lock in > the killable mode and return with EINTR if the task got killed while > waiting. > > Cc: linux-arch@vger.kernel.org > Cc: Andy Lutomirski > Signed-off-by: Michal Hocko I don't have much arch-specific insight, but looks OK. Acked-by: Vlastimil Babka