Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1919289ima; Mon, 22 Oct 2018 00:31:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV61mgK7uKEvKKIOJD8h/xqbAgNjEjfhyTTe8LH3WqjICge9Yx1pl9Ffxcqo9B8ZEIP8JHQdU X-Received: by 2002:a17:902:d696:: with SMTP id v22-v6mr11385902ply.261.1540193507038; Mon, 22 Oct 2018 00:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540193506; cv=none; d=google.com; s=arc-20160816; b=lOQkGLIEdJbTBTqCNRGZU3HSpEr04y62iPlil/sjjZZrUeiIn7ePtN5kwCf1V8oDYr YNGU7DnDTlAc30NDAmIGpga/t2mNtxZsaKH61Kac0jGLVs6Uqd3VVE9x8RnljCk0v3F5 VhdWDKviH+VOoJe/fAC5cQXUJwf/zp/3yNT7ijWCn0BnsoBIPsXzEXVfjR/tL3nFvJQQ Nye1fgj6emaIFVNcAc4kvGk25giewk4jvaZqgvuKQnStZqGcEcO6YWs2ojC/j1RRDSQJ Qm2YPt8VgpRk8javDgnis4MyOju+thRScECh5tYn5sNpoqTiaj/LCjV0M0d4QHaQr4nh X86w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nh6TfIAAE16IGcEuFepCvkCmMAK/HAXyj6StssKZLCY=; b=JGfOsRDIZk3CeCqZZHPqmQpW6c2b87fH16b/W0wMihZrcfrfajk9J8YfuUxo6McUJP dUzFsJiUf8QKgEx/c5UMFb+uMF6wz1iRRzUGFhKuOBfK1uXzRzbRt+9ojEcgmStmFutu p99QQLh9OBgHNj05K8Eol1s8QEQy3oB1zHp7PavVlV022DU8tAbUoZPBjPBodec2ygeZ Rz/XoUdxIUXGHJVSBo3DxfL8dsS3JmxgBODVeZCqds1CamZnPZUQp3UvfkmR9jURK7tR DwkCH2vmPBM7jVs6jROLb+2lkLx+ZtYMHXPrsoH9be1G89mwen0B4uss7M6GxlzcYZ3e oEmA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18-v6si9226649pgh.408.2018.10.22.00.31.32; Mon, 22 Oct 2018 00:31:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbeJVPa7 (ORCPT + 99 others); Mon, 22 Oct 2018 11:30:59 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32967 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbeJVPa7 (ORCPT ); Mon, 22 Oct 2018 11:30:59 -0400 Received: by mail-pg1-f194.google.com with SMTP id z2-v6so2193488pgp.0 for ; Mon, 22 Oct 2018 00:13:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nh6TfIAAE16IGcEuFepCvkCmMAK/HAXyj6StssKZLCY=; b=La29VbUbqeJp4BbmBb4bmfbzZIoG4ZuE5Dm2vrllwi/HieHdULK/yKWLdGozrKgrQ/ k99on5ILE/0Q1jMvkYBibLXjtJxUk+1iWRB7I6zhkomKFiF3hN8/j+ohnhdXGG9sCSvG hqgdyE0Qg5cD8XbI/m33/cb8EqIOtlTVX1IvO7gEdzy9cSGZu5lK9cIHgfISqApqfJ/N ZlVi/2HmSN/DlAizbuL2HaydvpJAsJERnMex/Xi6dHTmg97OZLUzBUGNB9iBEesiyOYT Gl1DFVHU9vTORrxa08IbYnE+dYCDjrIUp/8fKU5FYYZzpRLqorcxBJOh04lN3rbRwYze su5A== X-Gm-Message-State: ABuFfogDgRPWji1DU+oCrbIFMSCbn8rZ7b/skwWWTyBrpXMeGkDboHSq l3xtRPYhQn2/nY+JGh1RhB4= X-Received: by 2002:a62:ca4d:: with SMTP id n74-v6mr43743422pfg.10.1540192422214; Mon, 22 Oct 2018 00:13:42 -0700 (PDT) Received: from tiehlicka.suse.cz (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id c79-v6sm38097542pfc.92.2018.10.22.00.13.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 00:13:41 -0700 (PDT) From: Michal Hocko To: Cc: Johannes Weiner , Tetsuo Handa , David Rientjes , Andrew Morton , LKML , Michal Hocko Subject: [RFC PATCH 1/2] mm, oom: marks all killed tasks as oom victims Date: Mon, 22 Oct 2018 09:13:22 +0200 Message-Id: <20181022071323.9550-2-mhocko@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181022071323.9550-1-mhocko@kernel.org> References: <20181022071323.9550-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko Historically we have called mark_oom_victim only to the main task selected as the oom victim because oom victims have access to memory reserves and granting the access to all killed tasks could deplete memory reserves very quickly and cause even larger problems. Since only a partial access to memory reserves is allowed there is no longer this risk and so all tasks killed along with the oom victim can be considered as well. The primary motivation for that is that process groups which do not shared signals would behave more like standard thread groups wrt oom handling (aka tsk_is_oom_victim will work the same way for them). Signed-off-by: Michal Hocko --- mm/oom_kill.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index f10aa5360616..188ae490cf3e 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -898,6 +898,7 @@ static void __oom_kill_process(struct task_struct *victim) if (unlikely(p->flags & PF_KTHREAD)) continue; do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, PIDTYPE_TGID); + mark_oom_victim(p); } rcu_read_unlock(); -- 2.19.1