From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by kanga.kvack.org (Postfix) with ESMTP id BD2316B0253 for ; Sun, 20 Sep 2015 14:05:05 -0400 (EDT) Received: by igcpb10 with SMTP id pb10so65515363igc.1 for ; Sun, 20 Sep 2015 11:05:05 -0700 (PDT) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com. [2607:f8b0:4001:c06::22b]) by mx.google.com with ESMTPS id i10si14615863ioo.115.2015.09.20.11.05.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2015 11:05:05 -0700 (PDT) Received: by ioii196 with SMTP id i196so100705732ioi.3 for ; Sun, 20 Sep 2015 11:05:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20150920125642.GA2104@redhat.com> References: <1442512783-14719-1-git-send-email-kwalker@redhat.com> <20150919150316.GB31952@redhat.com> <20150920125642.GA2104@redhat.com> Date: Sun, 20 Sep 2015 11:05:04 -0700 Message-ID: Subject: Re: can't oom-kill zap the victim's memory? From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Oleg Nesterov Cc: Kyle Walker , Christoph Lameter , Michal Hocko , Andrew Morton , David Rientjes , Johannes Weiner , Vladimir Davydov , linux-mm , Linux Kernel Mailing List , Stanislav Kozina , Tetsuo Handa On Sun, Sep 20, 2015 at 5:56 AM, Oleg Nesterov wrote: > > In this case the workqueue thread will block. What workqueue thread? pagefault_out_of_memory -> out_of_memory -> oom_kill_process as far as I can tell, this can be called by any task. Now, that pagefault case should only happen when the page fault comes from user space, but we also have __alloc_pages_slowpath -> __alloc_pages_may_oom -> out_of_memory -> oom_kill_process which can be called from just about any context (but atomic allocations will never get here, so it can schedule etc). So what's your point? Explain again just how do you guarantee that you can take the mmap_sem. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org