Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6227311yba; Thu, 11 Apr 2019 15:02:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3qvNBnQ39zvgkOdMmKykdsUjWsNP0ef7u/eDKeTTiYTYVaPeIQkiXPj0vJsBMUsF3eCNQ X-Received: by 2002:a17:902:298b:: with SMTP id h11mr31201655plb.258.1555020150778; Thu, 11 Apr 2019 15:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555020150; cv=none; d=google.com; s=arc-20160816; b=x49Jw5AuTlps3ka3hZ/vI2+0rMfyRZuaa94ljNbjgpSr6KDIsOmY2QPdSbiX+BtgbV 1Uff4Wg0l0YUyiuCzf0BkAcNEXIGLw0ZizmHYhOwRTlMtU9iCRfGv3aMJ07/Fciyks3I PMFBp/2DEK6BqWCGW+bUM3nJdALDuDqi32LYmt60wKkR2PNUK/Sqj9eF96yOWc6fFOKb +2l/ClDFalhBJY1IBMFDLdaGKeL9aCbp2hA6QH5qeieoxlGm3B6gYjZwK7C1ocDW5yMN +jgHEos6SO6X+CGJhkWPajeom0J4ueEDw949K9LOCeIoEQZC1JTucWTBW4H2mQQQieYa /Lsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NawObyE9Zp16eLwFu5OPgzzdF2i4lMyPHI2QyUPOlK0=; b=EhnCX+BQZIIHSPSU505MTGdgcehVEkt2/HiuVQ2s6sDa7as58ZKYlVbKULRvHnliyK 9XdqkrsLhG6oLShPdzIfmfPjNVTS5OLcoxpp5PuZIYKxw+2b9sCNYJV+pfQozCvw3n2A 6fHuc1MZ1pyPydlWyAFtdnTCe3XkIm1J0vQkmSwK/2C/XbCqCOAYT5HACbVnUg0yxZuo hOwdm+MulqyhlfCDalrEzJsCJcMyyX7a7huFZVj1CfAAuvhOeCg23eYV+XxgREUwR+E3 i+Vp461U4GXjb1ixdah7sbTzuIco10Hj1/8hNI7CNUIlGzp46w8iKmZu1lNleL7EgZAC j4wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MqphQP92; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61si37164001plb.252.2019.04.11.15.02.13; Thu, 11 Apr 2019 15:02:30 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=MqphQP92; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726748AbfDKWAG (ORCPT + 99 others); Thu, 11 Apr 2019 18:00:06 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:40367 "EHLO mail-wr1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfDKWAF (ORCPT ); Thu, 11 Apr 2019 18:00:05 -0400 Received: by mail-wr1-f44.google.com with SMTP id h4so9286358wre.7 for ; Thu, 11 Apr 2019 15:00:04 -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=NawObyE9Zp16eLwFu5OPgzzdF2i4lMyPHI2QyUPOlK0=; b=MqphQP92OgsvRoMbbmbXn3lXPPv7JgQOj3uXy35tv7nQiYjdSaAyYZaXa/Q7P7wDXE kGDHBRN5P2Lxpgtg6vv9KELeDa+b3yyz+BtJsKyHo48XdAlE2kKFtC1jZgiuMjPMBn/9 OjTpxGIvco4tQgJzkGyFaNaRFQw9jCg2YL9qyPEAMG5OlnctCup4J4BXFYZ/5M2VYQr0 Xz7YQh086MWcG/jvWQkMTlzO9JW1GGWdNOTMp5I2/2LKJbdmYK+RLRhBva2DzlJdqhdP JiesYrjhOGVLwWT6cGkmVZ6UZseKXfSVFLy30lBl+Ts4/WKG4lrSxQ+OyS3G12/Y4EFk KCOQ== 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=NawObyE9Zp16eLwFu5OPgzzdF2i4lMyPHI2QyUPOlK0=; b=fIrHA/j6+GTqIC/4NsFCcWhCx9YzuAGi3TfAfW2yxjL9H4jS1tuFOxBxcXEPZo4wz+ M/Ga9wifR0A0nuMna9YkAZUPrLFbSGt3AHmb3WtE4VAOm28sV8VoCfzkMykqjbzJx9eK eWAJMW7GhJMwZ//OmYMtD2H4rjl1jcNCgO1JusP6M2mvKKhQFnNfgJWg9XN15GehUpfy GA3/xnbP2WPz7Bm74KUXz04jPf8t/AjbYUtpw8s7vwFhUE8tGixe5pyqTVEovgBbbz9N GNN+DjVTNpir/b0Pq+Qn75q3GBl5eaYRcCxX147JqnsdAPmGRqREmHAMwZh/577Y7GK1 U5kw== X-Gm-Message-State: APjAAAXiVgdELXI7fLLJ1ML2qE2cbtCwp5RANrMue5VRFhwI+eKZO1Ci CYpQgqUra8uQAe3XjmuboYMr8hYdfvllQaY8dBi3jw== X-Received: by 2002:adf:cf0c:: with SMTP id o12mr13689115wrj.16.1555020003406; Thu, 11 Apr 2019 15:00:03 -0700 (PDT) MIME-Version: 1.0 References: <20190411014353.113252-1-surenb@google.com> <20190411014353.113252-3-surenb@google.com> <20190411153313.GE22763@bombadil.infradead.org> <20190411214458.GB31565@tower.DHCP.thefacebook.com> In-Reply-To: <20190411214458.GB31565@tower.DHCP.thefacebook.com> From: Suren Baghdasaryan Date: Thu, 11 Apr 2019 14:59:51 -0700 Message-ID: Subject: Re: [RFC 2/2] signal: extend pidfd_send_signal() to allow expedited process killing To: Roman Gushchin Cc: Matthew Wilcox , Andrew Morton , "mhocko@suse.com" , David Rientjes , "yuzhoujian@didichuxing.com" , Souptick Joarder , Johannes Weiner , Tetsuo Handa , "ebiederm@xmission.com" , Shakeel Butt , Christian Brauner , Minchan Kim , Tim Murray , Daniel Colascione , Joel Fernandes , Jann Horn , linux-mm , "lsf-pc@lists.linux-foundation.org" , LKML , kernel-team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 11, 2019 at 2:45 PM Roman Gushchin wrote: > > On Thu, Apr 11, 2019 at 10:09:06AM -0700, Suren Baghdasaryan wrote: > > On Thu, Apr 11, 2019 at 8:33 AM Matthew Wilcox wrote: > > > > > > On Wed, Apr 10, 2019 at 06:43:53PM -0700, Suren Baghdasaryan wrote: > > > > Add new SS_EXPEDITE flag to be used when sending SIGKILL via > > > > pidfd_send_signal() syscall to allow expedited memory reclaim of the > > > > victim process. The usage of this flag is currently limited to SIGKILL > > > > signal and only to privileged users. > > > > > > What is the downside of doing expedited memory reclaim? ie why not do it > > > every time a process is going to die? > > Hello, Suren! > > I also like the idea to reap always. > > > I think with an implementation that does not use/abuse oom-reaper > > thread this could be done for any kill. As I mentioned oom-reaper is a > > limited resource which has access to memory reserves and should not be > > abused in the way I do in this reference implementation. > > In most OOM cases it doesn't matter that much which task to reap, > so I don't think that reusing the oom-reaper thread is bad. > It should be relatively easy to tweak in a way, that it won't > wait for mmap_sem if there are other tasks waiting to be reaped. > Also, the oom code add to the head of the list, and the expedited > killing to the end, or something like this. > > The only think, if we're going to reap all tasks, we probably > want to have a per-node oom_reaper thread. Thanks for the ideas Roman. I'll take some time to digest the input from everybody. What I heard from everyone is that we want this to be a part of generic kill functionality which does not require a change in userspace API. > Thanks! > > -- > You received this message because you are subscribed to the Google Groups "kernel-team" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >