Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp86625ima; Thu, 14 Mar 2019 20:47:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwH8w1Pn8eSgu7itdqo0AbsDP01sZP0lge0U/7jdKfmrKezMdS69Vp9h4HjK9j/DUCihzYH X-Received: by 2002:a62:8011:: with SMTP id j17mr1814863pfd.160.1552621648706; Thu, 14 Mar 2019 20:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552621648; cv=none; d=google.com; s=arc-20160816; b=TULAbzDS2XRx3QAceoUuvWisX5LaIGur0Ji/BNLzvgBwGhporhbsvFfZIA6UkUebcH vgljBNPbPGbT5Ngvnv/KPd/+I/mz98XBSZWdA2DSCsw3yFz7GUDkGDjMgz9SPS0xVX7Y CK4J2qJ/H0RDZ04iv9TkLDEULn6zTZXv6FVykCp2Th9V4E+wtUXl/+nstJ1AcZ6lbZdg I/qz75I9qry7zXLI41JVsrq7QvyE3AswtXetcnKrKxWiuVBshYQJsxOxW5Yd8mF/oSp2 hD7e8+Eby7Dxj2w7RGkBgI+E+IC24cVcdtwlKK/CX6e13wT7+Sl9oTJaV/6+OGy/2WSo FhOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jqNqOSWwhyyf+mDbXl2RsLz9qA1Z9EB5hcTdEP6DIm8=; b=bIwTHDOi7SVUeU4jzNclYr8diXNhGS9pfFbpwaqWjIaNwOAhtaZeb6xZP5IPDtWB+P RZvmC+XNYm6nubZfFcKefCbchdVqAhCcYUwFAbBL5aK3IgSZEAAR5zge0kq6qEvZY63e 4fv+tuGvBujQlmxOA5zVUiM2y0M0TOuG5tluYxlSgHrtKTBhqsL2SDRGhToo16naxFm8 KdacFmtXugq8H0Qj63a0+YYa3+uTMn2jc9aU2/cwaXAvM7rKQxj5o8HRkKG+jYLOosXa 127GqmkBE8rB4RB5F1ZN6hcLeORlqeKI1mYS1tfko7IJ9CaPmldOF0Tk05qOnTH1Qw4I v31w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n79si876627pfh.202.2019.03.14.20.47.13; Thu, 14 Mar 2019 20:47:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727515AbfCODpI (ORCPT + 99 others); Thu, 14 Mar 2019 23:45:08 -0400 Received: from mail-oi1-f172.google.com ([209.85.167.172]:41111 "EHLO mail-oi1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726910AbfCODpI (ORCPT ); Thu, 14 Mar 2019 23:45:08 -0400 Received: by mail-oi1-f172.google.com with SMTP id k8so6223830oik.8 for ; Thu, 14 Mar 2019 20:45:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jqNqOSWwhyyf+mDbXl2RsLz9qA1Z9EB5hcTdEP6DIm8=; b=F+A7tMjgqgwOlbrcjvaKvS2ffg5fZxUn0QOb5X53ob2p+fyQkAPoEhbE6LQXcLHm9o +Owy/8OqUCEBSqP0bNil+qAK5CggwmzdGqpYbmhHd80A73BaHsRURCdK6fEsv6C4Cn5a SWW6szpXpIkSoGUM9vNlwzxbhFxANi9aQ9wz2Qwwv78lINR88n9vfn7pDhhANgQFCEVj MsCUOML5X9dmIM68Kt9AFKVeuVtgiM14gZV3pnux8G/omWcrXPcFvwLizM6ZHe/H2uTM LtugnM7miSt9k4FTAviwnQzo6dvfCdFXDqxY3noSXMx+p0F3sftwpaKjZOPuT45TqwAe GxFQ== X-Gm-Message-State: APjAAAXg9wYcPfrXXqIXfe5xC2I/F1+TLDt+NtoDY93EY67ZLsEB2Phs GD1wA+3IJeKZb0u0QOv6EZg= X-Received: by 2002:aca:47d4:: with SMTP id u203mr295513oia.175.1552621507233; Thu, 14 Mar 2019 20:45:07 -0700 (PDT) Received: from sultan-box.localdomain ([107.193.118.89]) by smtp.gmail.com with ESMTPSA id b2sm587690oih.1.2019.03.14.20.45.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 20:45:06 -0700 (PDT) Date: Thu, 14 Mar 2019 20:45:02 -0700 From: Sultan Alsawaf To: Steven Rostedt Cc: Joel Fernandes , Tim Murray , Michal Hocko , Suren Baghdasaryan , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Christian Brauner , Ingo Molnar , Peter Zijlstra , LKML , "open list:ANDROID DRIVERS" , linux-mm , kernel-team Subject: Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android Message-ID: <20190315034502.GB3171@sultan-box.localdomain> References: <20190311175800.GA5522@sultan-box.localdomain> <20190311204626.GA3119@sultan-box.localdomain> <20190312080532.GE5721@dhcp22.suse.cz> <20190312163741.GA2762@sultan-box.localdomain> <20190314204911.GA875@sultan-box.localdomain> <20190314231641.5a37932b@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190314231641.5a37932b@oasis.local.home> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 14, 2019 at 11:16:41PM -0400, Steven Rostedt wrote: > 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. This can be done by introducing a new signal number that provides SIGKILL functionality while blocking (maybe SIGKILLBLOCK?). Thanks, Sultan