From patchwork Wed Oct 20 12:11:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 12572247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A465AC433EF for ; Wed, 20 Oct 2021 12:12:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C88460ED3 for ; Wed, 20 Oct 2021 12:12:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C88460ED3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8D1646B0071; Wed, 20 Oct 2021 08:12:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 880986B0072; Wed, 20 Oct 2021 08:12:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74891900002; Wed, 20 Oct 2021 08:12:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 648B76B0071 for ; Wed, 20 Oct 2021 08:12:04 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F28EE180300C1 for ; Wed, 20 Oct 2021 12:12:03 +0000 (UTC) X-FDA: 78716702526.05.996320F Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) by imf05.hostedemail.com (Postfix) with ESMTP id F11ED507519C for ; Wed, 20 Oct 2021 12:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:Subject :From; bh=Ogt0vQ4+gupep/lvDlFo1PXQW0DADnBHbHdATcZzm20=; b=bAVEJIxgSYk7Fvn45dl zabDL0FPXFzAupZNKZRT+F3njJTT6tY9TEmQJfiWXuyPNfiAgrA40jD02Ij0xywkyAmFyWwkgp9WE ArvtFI3nv6lb059uOy/T3Eck744pZCN7U6fYnWGjpyp72IRxDyJtspl6cWMLMCGZo3CyD2VdEsg=; Received: from [172.29.1.17] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mdARo-006b83-7l; Wed, 20 Oct 2021 15:11:56 +0300 From: Vasily Averin Subject: [PATCH memcg RFC 0/3] memcg: prohibit unconditional exceeding the limit of dying tasks To: Michal Hocko , Johannes Weiner , Vladimir Davydov , Andrew Morton Cc: Roman Gushchin , Uladzislau Rezki , Vlastimil Babka , Shakeel Butt , Mel Gorman , Tetsuo Handa , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org References: Message-ID: Date: Wed, 20 Oct 2021 15:11:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: F11ED507519C X-Stat-Signature: wohaytoyhi8qrpuahcekrudz46jb1twy Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=virtuozzo.com header.s=relay header.b=bAVEJIxg; spf=pass (imf05.hostedemail.com: domain of vvs@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=vvs@virtuozzo.com; dmarc=pass (policy=quarantine) header.from=virtuozzo.com X-HE-Tag: 1634731917-562750 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000029, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Dear Michal, as you requested, I splited v4 patch version into 3 separate parts. Let's discuss each of them. Open questions/ToDo: - Update patch descriptions (and add some comments) - in part 2 aka "memcg: remove charge forcinig for dying tasks": should we keep task_is_dying() in mem_cgroup_out_of_memory() ? - in part 3 aka "memcg: handle memcg oom failures" what is the best way to notify pagefault_out_of_memory() about mem_cgroup_out_of_memory failure ? - what is the best way to handle memcg failure doe to kmem limit, it can trigger false global OOM Vasily Averin (3): mm: do not firce global OOM from inside dying tasks memcg: remove charge forcinig for dying tasks memcg: handle memcg oom failures mm/memcontrol.c | 52 ++++++++++++++++++++++++++++--------------------- mm/oom_kill.c | 3 +++ 2 files changed, 33 insertions(+), 22 deletions(-)