From mboxrd@z Thu Jan 1 00:00:00 1970 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 B043AC433EF for ; Tue, 5 Oct 2021 14:55:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B58161216 for ; Tue, 5 Oct 2021 14:55:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6B58161216 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D75DC6B0071; Tue, 5 Oct 2021 10:55:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D248B6B0072; Tue, 5 Oct 2021 10:55:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C12EA900002; Tue, 5 Oct 2021 10:55:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id AE5AE6B0071 for ; Tue, 5 Oct 2021 10:55:16 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 704EE180163A4 for ; Tue, 5 Oct 2021 14:55:16 +0000 (UTC) X-FDA: 78662681832.21.85F5F4B Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf14.hostedemail.com (Postfix) with ESMTP id 05147600394A for ; Tue, 5 Oct 2021 14:55:15 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AC306223A3; Tue, 5 Oct 2021 14:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1633445714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S16oNrBuFcWuNh85hYkjoulTN4cPTW6zAgP9R8WFY7g=; b=KRM3Clmotf21/ys7DEwncqQlncDujGhwquNy00mM6atBKUGyELdWliY5ZR0P0QUP1a58Xl tngzGvs0v2qeAcZ+gK67gAhzUTwx+5jpEwqM0Jy8rAQ+qtBdGUvA+8OuvJ5xj48KltS8qo /rrWjruydyulK56D7kfWPCJN2nJ2ATw= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 13AB2A3B84; Tue, 5 Oct 2021 14:55:13 +0000 (UTC) Date: Tue, 5 Oct 2021 16:55:13 +0200 From: Michal Hocko To: Vasily Averin Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Tetsuo Handa , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@openvz.org Subject: Re: [PATCH memcg v3] memcg: prohibit unconditional exceeding the limit of dying tasks Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 05147600394A X-Stat-Signature: 8nxd3u87epk9akadbcpnypkxiz1jxtk1 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=KRM3Clmo; spf=pass (imf14.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1633445715-521427 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 05-10-21 16:52:31, Vasily Averin wrote: > v3: no functional changes, just improved patch description You haven't addressed my review feedback regarding the oom invocation. Let me paste it here again: : > @@ -1607,7 +1607,7 @@ static bool mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, : > * A few threads which were not waiting at mutex_lock_killable() can : > * fail to bail out. Therefore, check again after holding oom_lock. : > */ : > - ret = should_force_charge() || out_of_memory(&oc); : > + ret = task_is_dying() || out_of_memory(&oc); : : task_is_dying check will prevent the oom killer for dying tasks. There : is an additional bail out at out_of_memory layer. These checks are now : leading to a completely different behavior. Currently we simply use : "unlimited" reserves and therefore we do not have to kill any task. Now : the charge fails without using all reclaim measures. So I believe we : should drop those checks for memcg oom paths. I have to think about this : some more because I might be missing some other side effects. -- Michal Hocko SUSE Labs