Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3933845imm; Mon, 15 Oct 2018 06:36:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV63mHMJkTLlbweCC608e/Kx2Fbeyn45i6iGI9nP1NiazCJgecfHptbrSfKpOVEOuJ9oZ7ld5 X-Received: by 2002:a62:6041:: with SMTP id u62-v6mr8580813pfb.110.1539610567384; Mon, 15 Oct 2018 06:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539610567; cv=none; d=google.com; s=arc-20160816; b=gpPuODFPIdvdciOFo/w8NtONivi+uO6kD3aJxOb4M3PtLqZRqCJ0NXGDqKva4LF3iO J7F+JADImimyad/54PuIZJubL3nGaIkmqdJJ5eYPnvs4CtzFDXKxLWbC8EXmthnGzc2f 6gzbltIOI79k+R7KaIjstJng7NahtnWfDuI93AgzUiXbHCLmI3O+geFL64zHMpigUKkV ZwqUCU0qbR89eIEMzqmxpdeJbkdooK1G+ndVFXmlRm8bMUt54NeibEOM7WRQEmuJKzRE rC0AVdGqLxwqwPujHTMFswBtp82hqHRaw434hkX3IMA/ld+jgBf0dDIcz69V1QsyyIc0 etOw== 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=WHXgkuFr8ocYuwfu27EE3WUHr1b0lVO4AdgIc83Rd+c=; b=sDnrOFS/rHxmFGrE/ZhrBHOjdgZeAAVstbiywjoXXOOHDFnftbv7iJMazy9YxwcDF1 /czq7U9wWUdjkxXcpey+ssC9PcYRPovN4lbp4ey8EF7IsbdceRperoyNfYiHtULQCZMa lNhLytxJ+hzEqcMvAnRpAlAnu+4SI9ZG1xaTvoam+XIP5oWMXUrCLO+d+XmA6fTHGT40 FoLdTHFRAPANTBWei7XOFbO58KbwsEP2fnfF0hN+IzEXeoiYzW1Zz2BhysBk7slNL1RX XOBwhSZ1Kgk/LK9c/MQvtpokzix1M6ag6OL9dbul7pOMmlgAk3UEcKTnwlzaKv9i7NmT +Mqw== 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 l71-v6si10760245pge.463.2018.10.15.06.35.51; Mon, 15 Oct 2018 06:36: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726560AbeJOVUt (ORCPT + 99 others); Mon, 15 Oct 2018 17:20:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:34598 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726400AbeJOVUt (ORCPT ); Mon, 15 Oct 2018 17:20:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3C5D2AD07; Mon, 15 Oct 2018 13:35:27 +0000 (UTC) Date: Mon, 15 Oct 2018 15:35:24 +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: <20181015133524.GM18839@dhcp22.suse.cz> References: <9174f087-3f6f-f0ed-6009-509d4436a47a@i-love.sakura.ne.jp> <20181012124137.GA29330@cmpxchg.org> <0417c888-d74e-b6ae-a8f0-234cbde03d38@i-love.sakura.ne.jp> <20181013112238.GA762@cmpxchg.org> <20181015081934.GD18839@dhcp22.suse.cz> <20181015112427.GI18839@dhcp22.suse.cz> <6c0a57b3-bfd4-d832-b0bd-5dd3bcae460e@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c0a57b3-bfd4-d832-b0bd-5dd3bcae460e@i-love.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 Mon 15-10-18 21:47:08, Tetsuo Handa wrote: > On 2018/10/15 20:24, Michal Hocko wrote: > > On Mon 15-10-18 19:57:35, Tetsuo Handa wrote: > >> On 2018/10/15 17:19, Michal Hocko wrote: > >>> As so many dozens of times before, I will point you to an incremental > >>> nature of changes we really prefer in the mm land. We are also after a > >>> simplicity which your proposal lacks in many aspects. You seem to ignore > >>> that general approach and I have hard time to consider your NAK as a > >>> relevant feedback. Going to an extreme and basing a complex solution on > >>> it is not going to fly. No killable process should be a rare event which > >>> requires a seriously misconfigured memcg to happen so wildly. If you can > >>> trigger it with a normal user privileges then it would be a clear bug to > >>> address rather than work around with printk throttling. > >>> > >> > >> I can trigger 200+ times / 900+ lines / 69KB+ of needless OOM messages > >> with a normal user privileges. This is a lot of needless noise/delay. > > > > I am pretty sure you have understood the part of my message you have > > chosen to not quote where I have said that the specific rate limitting > > decisions can be changed based on reasonable configurations. There is > > absolutely zero reason to NAK a natural decision to unify the throttling > > and cook a per-memcg way for a very specific path instead. > > > >> No killable process is not a rare event, even without root privileges. > >> > >> [root@ccsecurity kumaneko]# time ./a.out > >> Killed > >> > >> real 0m2.396s > >> user 0m0.000s > >> sys 0m2.970s > >> [root@ccsecurity ~]# dmesg | grep 'no killable' | wc -l > >> 202 > >> [root@ccsecurity ~]# dmesg | wc > >> 942 7335 70716 > > > > OK, so this is 70kB worth of data pushed throug the console. Is this > > really killing any machine? > > > > 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. But fiddling with per memcg limit is not going to fly. Just realize what will happen if you have hundreds of different memcgs triggering this path around the same time. So can you start being reasonable and try to look at a wider picture finally please? -- Michal Hocko SUSE Labs