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 X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4809CC4320A for ; Mon, 2 Aug 2021 19:54:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C073E61050 for ; Mon, 2 Aug 2021 19:54:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C073E61050 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id CF1C96B0033; Mon, 2 Aug 2021 15:54:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA1066B0036; Mon, 2 Aug 2021 15:54:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B68656B005D; Mon, 2 Aug 2021 15:54:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 9DF146B0033 for ; Mon, 2 Aug 2021 15:54:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 487371F37C for ; Mon, 2 Aug 2021 19:54:03 +0000 (UTC) X-FDA: 78431191566.16.A33396A Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by imf10.hostedemail.com (Postfix) with ESMTP id 094B960080B3 for ; Mon, 2 Aug 2021 19:54:02 +0000 (UTC) Received: by mail-yb1-f174.google.com with SMTP id a93so12158865ybi.1 for ; Mon, 02 Aug 2021 12:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r51pjfza8s2HZE4XW/GNL6Iowf+AIDCryqM3vDA5jF0=; b=DAYvA9rfP2uv0YWaF+1ehuOCq1YPB/a8+QNZRahtWdRbWaD6MEOHky451k9S8b7xeG B2Im902DswK42N/fylfIy3bOexB+GE0C9pLTSfbmBoR4Cm46UH7IIM4/TLdJqLcGQbsP w/PDxJq7kELy9/mdLj9CGkJhECn9IYBK7zNzfvZPtC5p0lWvbVsrj1fZT9mxL/2Y9I8N dOeFqVAloLTVBWcrlMMpvIBaCcquN2VC6GsGjlTXUVzoQKjcN3b2AHjIza5a0Gnrbu8B AS9CehPVUNe/wPrQJ4DPXbO8IuHri/i7LMBKnikgsKmNSyKLkE6gDAVangHIhcTq14go Bwxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r51pjfza8s2HZE4XW/GNL6Iowf+AIDCryqM3vDA5jF0=; b=XMeGPZhidDF1cRvJS3CsMmk1ih+/eLdFDQwesoEKfOU6lHlQ5N/fvvMxa0rLT6L49s u57sLQg4m57TVFf8qSxp20RY1O5OBChrjEC+Wg8qiW04qAgHeQTxLYOQTXNackwKDn/u bsasH+7inRdrYxBaMhxbq/9/YOY4FlndMgOSvLPTF+YtEesuMR1+xYiEiJgJmcZZ79ws TMpCGZuHydcoEFnW4FQ6p0rvY+7E9/iTD52iAj7mlFql/COoPPX9gpkXOUI0S6ggYXBJ QgaqauJD28pAHgERwvX3W5Gv3ZtyrQxg1P7jfCHNnLQResSz1xOyUofkJKvPbt9/cOSf R/zQ== X-Gm-Message-State: AOAM530OKH0EsC0mJDIIcp55RVmnTHHHZ8c2TSBwt8isstFW0TbdmRC0 4vcicNzmsUIMb8+Uf5CyWZLP7tUgG/FjDvywteYGmQ== X-Google-Smtp-Source: ABdhPJxpo6fn/Ec+BXl6VDLMbnEoz80RcLHLkmWuS2+jWCgCgL5B6GLoLxGdD9dM5qOafDXt/CjrVtAJ+R98d8uKhMQ= X-Received: by 2002:a25:7ec4:: with SMTP id z187mr23611603ybc.136.1627934042111; Mon, 02 Aug 2021 12:54:02 -0700 (PDT) MIME-Version: 1.0 References: <20210723011436.60960-1-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Mon, 2 Aug 2021 12:53:51 -0700 Message-ID: Subject: Re: [PATCH v3 1/2] mm: introduce process_mrelease system call To: Shakeel Butt Cc: Michal Hocko , Andrew Morton , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Andy Lutomirski , Christian Brauner , Florian Weimer , Jan Engelhardt , Tim Murray , Linux API , Linux MM , LKML , kernel-team Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 094B960080B3 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=DAYvA9rf; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf10.hostedemail.com: domain of surenb@google.com designates 209.85.219.174 as permitted sender) smtp.mailfrom=surenb@google.com X-Stat-Signature: rzfc8m89aj64gb3hyw53fn6zjypna9qi X-HE-Tag: 1627934042-776563 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 Mon, Jul 26, 2021 at 6:44 AM Shakeel Butt wrote: > > On Mon, Jul 26, 2021 at 12:27 AM Michal Hocko wrote: > > > [...] > > > > Is process_mrelease on all of them really necessary? I thought that the > > primary reason for the call is to guarantee a forward progress in cases > > where the userspace OOM victim cannot die on SIGKILL. That should be > > more an exception than a normal case, no? > > > > I am thinking of using this API in this way: On user-defined OOM > condition, kill a job/cgroup and unconditionally reap all of its > processes. Keep monitoring the situation and if it does not improve go > for another kill and reap. > > I can add additional logic in between kill and reap to see if reap is > necessary but unconditionally reaping is more simple. > > > > > > An alternative would be to have a cgroup specific interface for > > > reaping similar to cgroup.kill. > > > > Could you elaborate? > > > > I mentioned this in [1] where I was thinking if it makes sense to > overload cgroup.kill to also add the SIGKILLed processes in > oom_reaper_list. The downside would be that there will be one thread > doing the reaping and the syscall approach allows userspace to reap in > multiple threads. I think for now, I would go with whatever Suren is > proposing and we can always add more stuff if need arises. > > [1] https://lore.kernel.org/containers/CALvZod4jsb6bFzTOS4ZRAJGAzBru0oWanAhezToprjACfGm+ew@mail.gmail.com/ Hi Folks, So far I don't think there was any request for further changes. Anything else you would want me to address or are we in a good shape wrt this feature? If so, would people who had a chance to review this patchset be willing to endorse it with their Reviewed-by or Acked-by? Thanks, Suren.