Received: by 10.192.165.148 with SMTP id m20csp5121274imm; Tue, 24 Apr 2018 14:09:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx48I4EFkxvaiipzDfzTqgmLAfwB8uTd3sZC6dB7xmUkAWF5oE50V1rgL/lJL7Un5aKCZOj3t X-Received: by 10.98.64.130 with SMTP id f2mr19555077pfd.83.1524604194548; Tue, 24 Apr 2018 14:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524604194; cv=none; d=google.com; s=arc-20160816; b=yUDyQFouoisH/V8kWOHR644OvkZfbQ0iAw33GmwsmeH3Cr2cCOlBDrI0/r1sJ8WFeJ Hg5tlBYDfrTcjIsgvnHLGCXI4905ByOnWIcpF4Rn/ISiAIJ990YT9OymfLvBnK1yfRxW 9y/prAbd14MbzaWqSflX73Kmw9jmBYswPYmrHRi92N+qCx6UjfMWiwk/bHQzOQJ8lTJb gJZ46TA/u4Rwv0KwAHJiJrOGDrpMtaDHk0I6PH1qvmWlGmEjykW4ydDoyn9K3zQhDbFx rW4tdPHoccDyEHUV3uNxAPOpJRxJbvujFVuWsyK5VM5f3CvoH1xBu9lHLdyW92PpayuZ XlPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=FWkjByml5KgwhosAEmljeAr915uDvdJaGLt02mWv9cE=; b=dTsYBf1tADsHyBJpQ38Ivbs4e6npyYwEDuAnYMFDJGlYeb3oJc1QOB9mXWyvY53Bnu BbReukDESq44gVFNM3zNnuaywzm9oYjBdT0SxDFTE/6f1cKIu7X/VAIoYcJ4viyfOJib S6NqqJV8ebBg6jnPAEIbvxtY3alYj1G3rvb9N31/DgLrnrmXKSzbuqGBY6Ev7xDuhFkS ySRAVck1urLH2wpW0VpNJ69Qtw3klurlu/2DWV85vVJt5InDm3ETDyxkwRyIj35PZVdq ECxYJj8v7W2ssziU8PTBocz4if4xw6CmVi+scyLplyy3secgZsBUQFrR0fry8O9D/Wan +/PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dI/2qA3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si12803363pgf.263.2018.04.24.14.09.40; Tue, 24 Apr 2018 14:09:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dI/2qA3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbeDXVIA (ORCPT + 99 others); Tue, 24 Apr 2018 17:08:00 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35002 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbeDXVHy (ORCPT ); Tue, 24 Apr 2018 17:07:54 -0400 Received: by mail-pg0-f65.google.com with SMTP id j11so11747650pgf.2 for ; Tue, 24 Apr 2018 14:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=FWkjByml5KgwhosAEmljeAr915uDvdJaGLt02mWv9cE=; b=dI/2qA3xXOZN7kV2xZ2cXH2uJ54XwZFXMsP8tZFjST/W7p+fCaGY9VzuvnN/zMroil 9URFw6zDGXl/UIvRAPCgDzq5o7K3Ds8m00jU06UuBlncgf+w+Eeb+i2i3ssAO8nc6MUR P92ud3XO6gkduVQdKJbAnKu9t7KrqKTi1LX94NCX1xiPDmwvXiQ6S9RGi+91ukGCX+W6 WIs0cPok4Bm1gDngG4F/QyzsKU3xisfgPS6ih2Rec/XFD+shxdQQTVZaDdshHfAmjDqQ ViFhdHPOcJhMkXAA4Vog9SLE3DxBb5t14gtt9U8Ra+MegU2P+b74ImOnx2/Hn+7TgtaZ i5lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=FWkjByml5KgwhosAEmljeAr915uDvdJaGLt02mWv9cE=; b=Cm42zC7PeHD9OXZoS2cMCeMDjpLX/diIDLE653fgSLWW2wZhUfFPsn8TcLA4Rp6mTl 83UzIEalqYGRLGQA5KXNbKti7vh8TxGAwXdCNCpF0joacnsTehNu90NNtx3uaXYU1Hbg C4saa1sUa3SGegiNhQREsdfQfwY+UUSZHNTJhn17p6asOlhF0YSCxZczjjzFfkEoRqzq n/dpxVfZpI7eF3OwjHt5LZzfrYfxZV1WK7htKJzrX9iHahC3kUBFWwi70OwhIsqAp84S C4M2GFDoqgDP/QszPRXGm66VAr+rPahoHByaZ/qH0qj4lfnO8ki1/zfXiMqeIKW3jKM8 eLgg== X-Gm-Message-State: ALQs6tD7gAPMYimvK2cQBB2Eh1Q8l5io7RqV1ut+33A/bY25o/9L+Vvb 9DV57HXeS129exRyBeirDk9QTA== X-Received: by 2002:a17:902:5914:: with SMTP id o20-v6mr26742048pli.40.1524604073739; Tue, 24 Apr 2018 14:07:53 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id w9sm30942477pfl.45.2018.04.24.14.07.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 14:07:52 -0700 (PDT) Date: Tue, 24 Apr 2018 14:07:52 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Andrew Morton , Tetsuo Handa , Andrea Arcangeli , guro@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v2] mm, oom: fix concurrent munlock and oom reaperunmap In-Reply-To: <20180424203148.GW17484@dhcp22.suse.cz> Message-ID: References: <20180420082349.GW17484@dhcp22.suse.cz> <20180420124044.GA17484@dhcp22.suse.cz> <201804221248.CHE35432.FtOMOLSHOFJFVQ@I-love.SAKURA.ne.jp> <20180424130432.GB17484@dhcp22.suse.cz> <20180424201352.GV17484@dhcp22.suse.cz> <20180424203148.GW17484@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > My patch has passed intensive testing on both x86 and powerpc, so I'll ask > > > > that it's pushed for 4.17-rc3. Many thanks to Tetsuo for the suggestion > > > > on calling __oom_reap_task_mm() from exit_mmap(). > > > > > > Yeah, but your patch does have a problem with blockable mmu notifiers > > > IIUC. > > > > What on earth are you talking about? exit_mmap() does > > mmu_notifier_release(). There are no blockable mmu notifiers. > > MMF_OOM_SKIP - remember? The thing that guarantees a forward progress. > So we cannot really depend on setting MMF_OOM_SKIP if a > mmu_notifier_release blocks for an excessive/unbounded amount of time. > If the thread is blocked in exit_mmap() because of mmu_notifier_release() then the oom reaper will eventually grab mm->mmap_sem (nothing holding it in exit_mmap()), return true, and oom_reap_task() will set MMF_OOM_SKIP. This is unchanged with the patch and is a completely separate issue. > Look I am not really interested in disussing this to death but it would > be really _nice_ if you could calm down a bit, stop fighting for the solution > you have proposed and ignore the feedback you are getting. > I assume we should spend more time considering the two untested patches you have sent, one of which killed 17 processes while a 8GB memory hog was exiting because the oom reaper couldn't grab mm->mmap_sem and set MMF_OOM_SKIP. > There are two things to care about here. Stop the race that can blow up > and do not regress MMF_OOM_SKIP guarantee. Can we please do that. My patch does both. Thanks.