[RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

Steven Rostedt rostedt at goodmis.org
Fri Mar 15 03:16:41 UTC 2019


On Thu, 14 Mar 2019 13:49:11 -0700
Sultan Alsawaf <sultan at kerneltoast.com> wrote:

> Perhaps I'm missing something, but if you want to know when a process has died
> after sending a SIGKILL to it, then why not just make the SIGKILL optionally
> block until the process has died completely? It'd be rather trivial to just
> store a pointer to an onstack completion inside the victim process' task_struct,
> and then complete it in free_task().

How would you implement such a method in userspace? kill() doesn't take
any parameters but the pid of the process you want to send a signal to,
and the signal to send. This would require a new system call, and be
quite a bit of work. If you can solve this with an ebpf program, I
strongly suggest you do that instead.

-- Steve


More information about the devel mailing list