Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1888682pxy; Mon, 2 Aug 2021 12:57:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjswnFJUzVzDkDRtEMOH8eCBdT/BRMiaUz1f3jB8DbgfWWDg43W3EBwMcNCpyS0kAiUgt/ X-Received: by 2002:a17:906:9b87:: with SMTP id dd7mr15919434ejc.99.1627934266448; Mon, 02 Aug 2021 12:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627934266; cv=none; d=google.com; s=arc-20160816; b=dRP/7D1xLqleghVztt39cHm0s9w52m/pfb71UYieWQwTlINpcoYIW5pD3Ekk3j46A2 Ki8xVR8QZcr4k+uPM2WlMIvfdNtfztGWYMDo9ZCjoI6jWiGDCqzjNjzgry4lDw6I36Bw RFQv4Roi3L4dVeBaSGehqP6bP+AjCXgckoTBEI6QM/BScV9fxfkLlGFFsB0iwsizNFcD ULTP1I3OpD2E3qd7FqZ6SFGZJVPyoe/3AICwEpu1ViJWfguF22AeqkSFRr/MDwWIBslh CBzOj7JlFiiwdenK7wdASPAUbRW2C8H8RFBGSf22sfBaCwNJ/b/Htp6UJeCsXjUXWM2V AcfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=r51pjfza8s2HZE4XW/GNL6Iowf+AIDCryqM3vDA5jF0=; b=OwE24awz16mblCCyGvn2pTP57zAu/V+ySv662wIOiSiq5AhphVoCIxiQu9LVzA1mhm Ma1wNmE9tRYMHzQ7HjuJe5/+aHpDe+2tR4TQpWUf7mvLfyoDCujD/A3qcgu3OGrzT0t+ al9T5PANx894a1SXBWz8XEYJ5pp0u4GnFsc9reK6SpdebMXpI4WDF1xWgvL6z3F36Fox r2yHfaJZDro7e3MM5kyv7stXKGtaMYsZdJJuit23B6mJcn4i06MIdTX4KwLoibEDn7H/ MPMRa2NZRg73svqPnbCwjRktYtCINuh6dAPSDgCphzutyAbstJ2ALxc0axfMaU40XrgG l3Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DAYvA9rf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd3si11047036ejb.632.2021.08.02.12.57.23; Mon, 02 Aug 2021 12:57:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DAYvA9rf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbhHBTyO (ORCPT + 99 others); Mon, 2 Aug 2021 15:54:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229663AbhHBTyN (ORCPT ); Mon, 2 Aug 2021 15:54:13 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D9A7C061760 for ; Mon, 2 Aug 2021 12:54:03 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id z18so3583841ybg.8 for ; Mon, 02 Aug 2021 12:54:03 -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=pDp8Y4K+xDfUhnu9+nbI2Sp0Bn8GwjNX8GagDfZqJqNP+xvL7EWQ22NrDwTN3FL29z Sp4QTqOhICMRVnrzs01SFMM887OhBo1Zt+estk0AXEyyK7ontew6AX/SRckuxt/cKkNc P+BUMqseu/8Xxkpclu2Cw5FKuhEkZkEs2gr8AZHV6HALFqIVJY0azE5aPL7+0R/IXUNk vnzRvvQbOEVNgRCi9K88NUXE7HCSWEZxvXdyRLHRoBTLoBDQXULYW9CiNIEMmwpmdQb6 Cwt52zdkcRyWtPwPAu9/JsNrUgdX3w8YFk1/59hxcA4je608A2QtIkjFGrpuB+tS3NlZ MaTA== X-Gm-Message-State: AOAM533lXdmxP0o78bWh05HZECRICdzHES9PkOfoyEilpUXqJDx7i+EI wXppitx89WNER/P1NOjROKlrsxiItmAYLNe/AgfzLQ== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.