Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp466824ybh; Wed, 11 Mar 2020 04:43:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuv4dLjt5J2O0ZULgGQq9YKU5q7S0dtpzulFeDu6jYMjBPjRgvS33ACT0sLNtvpeKRBRdKn X-Received: by 2002:a9d:7393:: with SMTP id j19mr1839717otk.254.1583926987055; Wed, 11 Mar 2020 04:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583926987; cv=none; d=google.com; s=arc-20160816; b=f6S6LXZkPFnelFOZAKzCg5goWBLDE214ZqyihrBc3sbTdCxi6dyoNJDh8JGID8PMCH yoqedRPW7egSstCcAIe1Nf0KCFChFsgs159mt+usoje8gtkit/jeMd9vlH0f2UUa4Qfb oQ8klhkYUCxcCxD3ICMPq9FcVP1u1j1CjWpfU0bm8uh6VNKlR+zZIe9JEtnKgd00GG/i xb9gsgTAHfTNY3a9+DJHqowMKuAlbGnkPOqPEOrlDZwNcQUbhDqV3PYD2TVaR2vpJJrf 1MG65LQ6e9iRV9QkUdvirAx22RzyclOPqwk/QXXABKHa1x37RDvesewlWEO6EzTJzuwv vkZA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ji/N3FptWj4fs0yoIlWLS6/rIbTVX0TbK2Oh/tYTeiQ=; b=cJmOf9LLLLhwukqIsFHPU108aarbF2qqejekWks89ZxgrhgKyqwCbEnEQrRJf1sZbU W4Xs54afB824lU+GQn17A0PczOSEPoWof4rof1SwIzbQ9mSnut0bbgDaR4EQvGJVDRHE thoM4l2zfCRhQ3FAvoys1KVdtEigVQELAYXlEAbgfWosaInEMeym4O1XO233VrAARDlB sN0NCXdQDDH6svzq1eyDBx3tiMpWJpwumbW5IKs2CG0DFQ8Y17uRL35av/nZIiubTSqz v2xy1LAGP6bzqWH62j919jrvwty0Xbf6KQIDk5YsyErEnyYpNN9IgwFERfPDJPElBfNM WhzA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26si917202otk.156.2020.03.11.04.42.54; Wed, 11 Mar 2020 04:43:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729180AbgCKLmI (ORCPT + 99 others); Wed, 11 Mar 2020 07:42:08 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:61248 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgCKLmH (ORCPT ); Wed, 11 Mar 2020 07:42:07 -0400 Received: from fsav101.sakura.ne.jp (fsav101.sakura.ne.jp [27.133.134.228]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 02BBfmMb037147; Wed, 11 Mar 2020 20:41:48 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav101.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav101.sakura.ne.jp); Wed, 11 Mar 2020 20:41:48 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav101.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 02BBflON037143 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Mar 2020 20:41:47 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Subject: Re: [patch] mm, oom: make a last minute check to prevent unnecessary memcg oom kills To: David Rientjes Cc: Michal Hocko , Robert Kolchmeyer , Andrew Morton , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20200310221938.GF8447@dhcp22.suse.cz> From: Tetsuo Handa Message-ID: <54d56b12-3f75-1382-cc12-a8e63e24ce1f@I-love.SAKURA.ne.jp> Date: Wed, 11 Mar 2020 20:41:45 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/03/11 7:54, David Rientjes wrote: > The patch certainly prevents unnecessary oom kills when there is a pending > victim that uncharges its memory between invoking the oom killer and > finding MMF_OOM_SKIP in the list of eligible tasks and its much more > common on systems with limited cpu cores. I think that it is dump_header() which currently spends much time (due to synchronous printing) enough to make "the second memcg oom kill shows usage is >40MB below its limit of 100MB" happen. Shouldn't we call dump_header() and then do the last check and end with "but did not kill anybody" message?