mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Arseniy Lesin <emptiedsoul@hardclanz.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RESEND RFC] SIGOOM Proposal
Date: Thu, 12 Jan 2023 06:13:42 +0100	[thread overview]
Message-ID: <20230112051342.GB19712@1wt.eu> (raw)
In-Reply-To: <CPPXX7JYJGIE.3F2R53GC3ULGZ@hardclanz>

Hello,

On Thu, Jan 12, 2023 at 07:51:45AM +0300, Arseniy Lesin wrote:
> 2.1. The SIGOOM Signal
> ------------------
> 
> I propose the addition of new signal: SIGOOM (Out-Of-Memory SIGnal) 
> 
> This signal is intended to be sent to the most memory-hungry process(es)
> in order to give process a chance to release memory used for
> non-valuable data (for example, browser can unload tabs, that are
> currently not in use, assuming tabs are not separate processes) or to
> write down valuable data and exit gracefully (for example, some
> graphical editor).
> 
> Some applications can even set up a poll for OOM event by using signalfd
> 
> Default action: 	IGNORE
> Proposed senders: 	kernel- and user-space OOM-killers
> 
> The technical detail of this addition is a bit unpleasant: there is
> actually no room for new signals! 

Do this simpler, let userspace configure the signal it wants to
receive for this via a new prctl(PR_SET_OOMSIG) and this would allow
each process to voluntarily declare this intended behavior and the
associated signal at the same time. There are already other comparable
mechanisms existing there (signal to receive on parent's death, or on
memory error for example).

Willy

  reply	other threads:[~2023-01-12  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  4:51 Arseniy Lesin
2023-01-12  5:13 ` Willy Tarreau [this message]
2023-01-12  6:45 ` Theodore Ts'o
2023-01-12 19:52   ` Arseniy Lesin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230112051342.GB19712@1wt.eu \
    --to=w@1wt.eu \
    --cc=emptiedsoul@hardclanz.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®