Received: by 10.223.164.221 with SMTP id h29csp966415wrb; Wed, 1 Nov 2017 08:17:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RW7nvMKtjx41udUN/zGkAFccBXcUd/8ZLbHetXjm8yBv4b3HFPZJxg9TDA+iFFYpI+TwCV X-Received: by 10.98.64.75 with SMTP id n72mr207458pfa.317.1509549463911; Wed, 01 Nov 2017 08:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509549463; cv=none; d=google.com; s=arc-20160816; b=efZqjtWM4czKhdj3/rsuDCHoBdeEWuNHdDlzv35viEHUKGtzP/S5idp5W0XmpYxnhD hmIM1+3pOySRT5YdEF4SWm4K8qQaTCasUG1d64yURbcW2ZmV/ytsqDuFZDYWHgNwc8HH ThaRPIuyareAFpPqFcFLrTOHcLZvMRFjluQjzvY9QWDooB2DZDkbpURI38N3E6SpfNdI MbSrxh7sVZoRBCemh7+L6/n2ZS/178S1GQzv0u8yc53GhYvVn8WrR5JBHfEi1KnWUsJ9 1c1xNbEzv//HFotE5fEuyK9PmoKnfdckmZdwVcHYDZHwObl1UGugAhF3KS6zqpxRCEUr DUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:date:references:subject :content-transfer-encoding:mime-version:cc:to:from:message-id :dkim-signature:arc-authentication-results; bh=dbxWTIG4KohlvX6Wv4v8U/hj59xRT9QLyZ8k/csvPFw=; b=RWf77jUlfL2aChkdEYkqksivxE7fWYfA2DQ2tE97XzqqUMQWLwtuVqtRs6L/3tkC2s U9pvB6oMz63K6WmnDvn2aO2dmlqa8TucJgqTUoDtU8hs4JCiFXnqYKgKrJMM0g0k1bGL 9/NemXx2eV04Pl4R1ZU/4zG64HnThEqMxES9Yc6TwSkrqkHkXaVG6m9mU1uZOQrl2NZY wOxNY5zCpk7bjGrtn5GxblROIUyGHinEnqJsHgxR6RAGTT1TWWYEYo6IYTyfYDqls+SS 5V5ZzgxaLSHAzZxfZxJd7NBVgG3zXA85t9uh9hMmtNHF+73E7Rzwn5c4Pg7QYbjv+jJW pCoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=USZT3NSO; 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 h128si1195995pgc.476.2017.11.01.08.17.29; Wed, 01 Nov 2017 08:17:43 -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=@messagingengine.com header.s=fm1 header.b=USZT3NSO; 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 S1754695AbdKAPQk (ORCPT + 99 others); Wed, 1 Nov 2017 11:16:40 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36551 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbdKAPQi (ORCPT ); Wed, 1 Nov 2017 11:16:38 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A5A6720B85; Wed, 1 Nov 2017 11:16:37 -0400 (EDT) Received: from web4 ([10.202.2.214]) by compute3.internal (MEProxy); Wed, 01 Nov 2017 11:16:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=dbxWTI G4KohlvX6Wv4v8U/hj59xRT9QLyZ8k/csvPFw=; b=USZT3NSOsS71Jfmq/U3SiZ EBf9ls5sDb+nuxM17akxJbaNG/pKayK2CdWZrx+DgXFEePaqLlBBzcjXdtf8j7qG tnoIerIVo601PCvYsBpRgBXRRBpFHmxhXg7020Tvr+4G2C3SytnSfo4rhk671ulk +BGDyE0DB8rGLB9ivv7V97EL5sqm8Qfn8SVJBGNRy4fhJnYx7CYoU9bDC6LG2eGM nuDxHBB6Wl/B9dgvhtyRI5oAC289as1cdwwudCHGn12k5bAjOuDCemr5AqBZX0Ib U/QwwwphQvhBoquE/tKATL/OKHqCq3yL511E8MRN9hUmuyqb5SvZ3a6PcaHybBtQ == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 86598BAB62; Wed, 1 Nov 2017 11:16:37 -0400 (EDT) Message-Id: <1509549397.2561228.1158168688.4CFA4326@webmail.messagingengine.com> From: Colin Walters To: Shawn Landden Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-66b6e65c Subject: Re: [RFC] EPOLL_KILLME: New flag to epoll_wait() that subscribes process to death row (new syscall) References: <20171101053244.5218-1-slandden@gmail.com> Date: Wed, 01 Nov 2017 11:16:37 -0400 In-Reply-To: <20171101053244.5218-1-slandden@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 1, 2017, at 01:32 AM, Shawn Landden wrote: > It is common for services to be stateless around their main event loop. > If a process passes the EPOLL_KILLME flag to epoll_wait5() then it > signals to the kernel that epoll_wait5() may not complete, and the kernel > may send SIGKILL if resources get tight. > I've thought about something like this in the past too and would love to see it land. Bigger picture, this also comes up in (server) container environments, see e.g.: https://docs.openshift.com/container-platform/3.3/admin_guide/idling_applications.html There's going to be a long slog getting apps to actually make use of this, but I suspect if it gets wrapped up nicely in some "framework" libraries for C/C++, and be bound in the language ecosystems like golang we could see a fair amount of adoption on the order of a year or two. However, while I understand why it feels natural to tie this to epoll, as the maintainer of glib2 which is used by a *lot* of things; I'm not sure we're going to port to epoll anytime soon. Why not just make this a prctl()? It's not like it's really any less racy to do: prctl(PR_SET_IDLE) epoll() and this also allows: prctl(PR_SET_IDLE) poll() And as this is most often just going to be an optional hint it's easier to e.g. just ignore EINVAL from the prctl(). From 1582872823510777324@xxx Wed Nov 01 14:05:57 +0000 2017 X-GM-THRID: 1582840593921048574 X-Gmail-Labels: Inbox,Category Forums