Received: by 10.213.65.68 with SMTP id h4csp3635891imn; Tue, 10 Apr 2018 02:05:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx48WTvptC3QQge9TC8PRdFYETIOHxFAGxV2OZAadjdB0hj4NR3j3uYlpYa78tgvoANaU5rWC X-Received: by 2002:a17:902:590e:: with SMTP id o14-v6mr18381945pli.229.1523351129979; Tue, 10 Apr 2018 02:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523351129; cv=none; d=google.com; s=arc-20160816; b=QHBIT32DhuC2fKQbwPop+Xn7HId8WrzZYKe9rwmQD//83mmn5pwP/lN/OWticRWccz 1iUxXKvp4DnMJ5y/uoLvkHLVELZun3mwthl1O6IHR+Lx7BFmmFXDqet0qjEs8pOtFuCe aEpKPr6L//JyubbgiEUc+AUY8Qe9dNrkU5MkainEyojs+OLZQCv4he52+lZUMZ/q5uNM DlHl/1/oOkV2LGEaG0HuPJMoaLZ4Su2zEV871nGdoKddWVAH8gHyCNOkSZlhYd8j29D0 5QpY4PWgKuE4MwxKzeJDDpwk1HHJ7rdPCAHniCarPJ6D4UbyOm26q2xQLqcDZk3lVPe+ ks3w== 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:arc-authentication-results; bh=Sb/DUbI63wFEto+JtYzdN/Sog25U0bmPX8anKcgdcLk=; b=KKrymfayVUEWrJEMYE4ZBtZCPPA4gBs5kZHxsnR6pPpoFxcH2dLVpY7CeSqrhrDrm+ d1qPX/I9ZFZsNUZnuHrcWvQEbgijyw1ZuL2afxSxNLhu3PUZ8vAqZLHk6VUUZzFXDi7s yVumKK1ratK5yQVpqFyu+0UXAIp1lKA1IWvUVuAsM0+pwph7hNpLwI7fASHe2FxW6WXB DAWVSXSHlbE94mSr78QPlAi2Oa3e0FFABqpsuEGenLSGWFeThn4pn6ch4GPXkW7fgsev gE1nybVhDWpTEMrJ/rH5Q9JdQDIVtsYJWrVTELy83jbnnPJMWU3XYjGQYQqsB4kUhW5d x4wg== 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 bg3-v6si2115021plb.118.2018.04.10.02.04.52; Tue, 10 Apr 2018 02:05:29 -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 S1752774AbeDJJBd (ORCPT + 99 others); Tue, 10 Apr 2018 05:01:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:47050 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368AbeDJJBb (ORCPT ); Tue, 10 Apr 2018 05:01:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AF70CAC71; Tue, 10 Apr 2018 09:01:30 +0000 (UTC) Date: Tue, 10 Apr 2018 11:01:28 +0200 From: Michal Hocko To: Zhaoyang Huang Cc: Steven Rostedt , Ingo Molnar , LKML Subject: Re: [PATCH v1] ringbuffer: Don't choose the process with adj equal OOM_SCORE_ADJ_MIN Message-ID: <20180410090128.GY21835@dhcp22.suse.cz> References: <20180409231230.1ab99e85@vmware.local.home> <20180410061447.GQ21835@dhcp22.suse.cz> <20180410074921.GU21835@dhcp22.suse.cz> <20180410081231.GV21835@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 10-04-18 16:38:32, Zhaoyang Huang wrote: > On Tue, Apr 10, 2018 at 4:12 PM, Michal Hocko wrote: > > On Tue 10-04-18 16:04:40, Zhaoyang Huang wrote: > >> On Tue, Apr 10, 2018 at 3:49 PM, Michal Hocko wrote: > >> > On Tue 10-04-18 14:39:35, Zhaoyang Huang wrote: > >> >> On Tue, Apr 10, 2018 at 2:14 PM, Michal Hocko wrote: > > [...] > >> >> > OOM_SCORE_ADJ_MIN means "hide the process from the OOM killer completely". > >> >> > So what exactly do you want to achieve here? Because from the above it > >> >> > sounds like opposite things. /me confused... > >> >> > > >> >> Steve's patch intend to have the process be OOM's victim when it > >> >> over-allocating pages for ring buffer. I amend a patch over to protect > >> >> process with OOM_SCORE_ADJ_MIN from doing so. Because it will make > >> >> such process to be selected by current OOM's way of > >> >> selecting.(consider OOM_FLAG_ORIGIN first before the adj) > >> > > >> > I just wouldn't really care unless there is an existing and reasonable > >> > usecase for an application which updates the ring buffer size _and_ it > >> > is OOM disabled at the same time. > >> There is indeed such kind of test case on my android system, which is > >> known as CTS and Monkey etc. > > > > Does the test simulate a real workload? I mean we have two things here > > > > oom disabled task and an updater of the ftrace ring buffer to a > > potentially large size. The second can be completely isolated to a > > different context, no? So why do they run in the single user process > > context? > ok. I think there are some misunderstandings here. Let me try to > explain more by my poor English. There is just one thing here. The > updater is originally a oom disabled task with adj=OOM_SCORE_ADJ_MIN. > With Steven's patch, it will periodically become a oom killable task > by calling set_current_oom_origin() for user process which is > enlarging the ring buffer. What I am doing here is limit the user > process to the ones that adj > -1000. I've understood that part. And I am arguing whether this is really such an important case to play further tricks. Wouldn't it be much simpler to put the updater out to a separate process? OOM disabled processes shouldn't really do unexpectedly large allocations. Full stop. Otherwise you risk a large system disruptions. -- Michal Hocko SUSE Labs