Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4931082imm; Tue, 16 Oct 2018 02:21:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV6082w1j8QYBdNxb/16M8yXgv1XlwlerFzNoW5oLVbe8884UE3yM305FuPGvZQ6m3U+g97Y9 X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr21128599pla.178.1539681705656; Tue, 16 Oct 2018 02:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539681705; cv=none; d=google.com; s=arc-20160816; b=Md0W9PnBhXbdv2LiuMjRVbXsOLeaUGxLlcagGt95EwPmOWNmLvFD19r0a8Uh4TgqT+ verfB/S97sqTfFJe9sbv6OpcEomJXz7X9lLcvSGVydc8D4hclmpBCUretpd2bCoSWxJP ClZf5T4dDTNyFzagz7poCy5eErFCe33a5tjXINmCKFxLC/YBgtK+a+6ceE75b0eskWNF iggQA8+tNQaOBWRqnznBSDoHRp9tGaEGOkc3D5j9ZzRjw95Y1vtH7l8LdTZ2NAixgR14 insVJ8ccmotAyp3xMaHrvDKL8XcWDTx2M6OAiSYAqXfqPNMgX69tHZSMTqkv7wetKgTa SZmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=73KVel5poGKvCzfmfaa39GXPXK8tSXT5xAu/XJKhU/4=; b=e7ZGq7jU2xBSAHnGSD3J6ZWz9oS6ZKVspEWsC6+HbXJn6o+fY9jPmOUh8qYlvSSIsH BwlPkXuTwMki/03k/JyGJBZusZmgLc03VGlWvfFlrDgBT8ngByCIm7oN/jnLabdEhDTI W/mxvyVAT67DB4IGdwKSTBxXdudAtLgQSXtoFqxIdRHt24HRWy229NicyTpZZRX3qt7M Cjuq75/XB1xaWzke8U/6vO+SsE+7j1MlmZYCZn5TYTeKL6Qu7R+SzvJFanPF0Fv1BWuh GN2JrygKGT29kMRK/E2b1DlysSVUDLk1RGDSyi7JYG9kgi6W8lreBfnFJAWGCnyR+cOR 3dFw== 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 l4-v6si14662937plb.351.2018.10.16.02.21.30; Tue, 16 Oct 2018 02:21:45 -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 S1727634AbeJPRKQ (ORCPT + 99 others); Tue, 16 Oct 2018 13:10:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:45202 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726581AbeJPRKQ (ORCPT ); Tue, 16 Oct 2018 13:10:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9D67DAF77; Tue, 16 Oct 2018 09:20:44 +0000 (UTC) Date: Tue, 16 Oct 2018 11:20:43 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Johannes Weiner , linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, guro@fb.com, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, rientjes@google.com, yang.s@alibaba-inc.com, Andrew Morton , Sergey Senozhatsky , Petr Mladek , Sergey Senozhatsky , Steven Rostedt Subject: Re: [RFC PATCH] memcg, oom: throttle dump_header for memcg ooms without eligible tasks Message-ID: <20181016092043.GP18839@dhcp22.suse.cz> References: <6c0a57b3-bfd4-d832-b0bd-5dd3bcae460e@i-love.sakura.ne.jp> <20181015133524.GM18839@dhcp22.suse.cz> <201810160055.w9G0t62E045154@www262.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201810160055.w9G0t62E045154@www262.sakura.ne.jp> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-10-18 09:55:06, Tetsuo Handa wrote: > On 2018/10/15 22:35, Michal Hocko wrote: > >> Nobody can prove that it never kills some machine. This is just one example result of > >> one example stress tried in my environment. Since I am secure programming man from security > >> subsystem, I really hate your "Can you trigger it?" resistance. Since this is OOM path > >> where nobody tests, starting from being prepared for the worst case keeps things simple. > > > > There is simply no way to be generally safe this kind of situation. As > > soon as your console is so slow that you cannot push the oom report > > through there is only one single option left and that is to disable the > > oom report altogether. And that might be a viable option. > > There is a way to be safe this kind of situation. The way is to make sure that printk() > is called with enough interval. That is, count the interval between the end of previous > printk() messages and the beginning of next printk() messages. You are simply wrong. Because any interval is meaningless without knowing the printk throughput. [...] > lines on evey page fault event. A kernel which consumes multiple milliseconds on each page > fault event (due to printk() messages from the defunctional OOM killer) is stupid. Not if it represent an unusual situation where there is no eligible task available. Because this is an exceptional case where the cost of the printk is simply not relevant. [...] I am sorry to skip large part of your message but this discussion, like many others, doesn't lead anywhere. You simply refuse to understand some of the core assumptions in this area. > Anyway, I'm OK if we apply _BOTH_ your patch and my patch. Or I'm OK with simplified > one shown below (because you don't like per memcg limit). My patch is adding a rate-limit! I really fail to see why we need yet another one on top of it. This is just ridiculous. I can see reasons to tune that rate limit but adding 2 different mechanisms is just wrong. If your NAK to unify the ratelimit for dump_header for all paths still holds then I do not care too much to push it forward. But I find thiis way of the review feedback counter productive. -- Michal Hocko SUSE Labs