From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbdHJHu2 (ORCPT ); Thu, 10 Aug 2017 03:50:28 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35566 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbdHJHu0 (ORCPT ); Thu, 10 Aug 2017 03:50:26 -0400 From: Michal Hocko To: Andrew Morton Cc: Mel Gorman , Tetsuo Handa , David Rientjes , Johannes Weiner , Roman Gushchin , , LKML Subject: [PATCH v2 0/2] mm, oom: do not grant oom victims full memory reserves access Date: Thu, 10 Aug 2017 09:50:17 +0200 Message-Id: <20170810075019.28998-1-mhocko@kernel.org> X-Mailer: git-send-email 2.13.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this is a second version of the series previously posted [1]. Tetsuo has noticed a bug I've introduced during the rebase and also pointed out reserves access changes on nommu arches which I have addressed as well. Mel had some more feedback which is hopefully addressed as well. There were no further comments so I am reposting and asking for inclusion. this is a part of a larger series I posted back in Oct last year [2]. I have dropped patch 3 because it was incorrect and patch 4 is not applicable without it. The primary reason to apply patch 1 is to remove a risk of the complete memory depletion by oom victims. While this is a theoretical risk right now there is a demand for memcg aware oom killer which might kill all processes inside a memcg which can be a lot of tasks. That would make the risk quite real. This issue is addressed by limiting access to memory reserves. We no longer use TIF_MEMDIE to grant the access and use tsk_is_oom_victim instead. See Patch 1 for more details. Patch 2 is a trivial follow up cleanup. I would still like to get rid of TIF_MEMDIE completely but I do not have time to do it now and it is not a pressing issue. [1] http://lkml.kernel.org/r/20170727090357.3205-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/20161004090009.7974-1-mhocko@kernel.org