Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp60020ybv; Tue, 4 Feb 2020 16:25:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxk5pzjbu+zp/n7Z26xwxLClII3CpU3y9z2NSQ1j8AeT1FkhCaC7VcYVVbB4qzC8Gs7AYMT X-Received: by 2002:aca:e106:: with SMTP id y6mr1157366oig.131.1580862316146; Tue, 04 Feb 2020 16:25:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580862316; cv=none; d=google.com; s=arc-20160816; b=d9FaOSGK/A2CsVyrTOIAtKQtNEY1G0SEzzIZa0SPMxzEVGJxCXIEwkVYQmRhLsleqo PUTCOAB93gMNH/OOkvte1OQ+9eafuP4CVpQQNLox6IAFjm4OyixHC27GtN8ShMebI7dw GoYIzYqWzjNU5F7zt/EmfUbhw65+ag0H+7ovFPXQh2zM5LbMtz0n6NHVGhDNJn9BmFSI TMKw66tiqSLodTx5MrJTjwA6XX4IFo2tSual222Q2AwMMy33pnomazRP+PM3BzkUlsWZ BSnaG2RBVgow0JawZmLus63nSZK03vx5Q1i3zolzKPbqT2A7m4ySCH3t+yrdlEyTsw2s JtYQ== 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=yquseZqSXHRlXkhxPsIjPFFKlq2YY76NqDL9OEAfgJ4=; b=YgqsEx9nmXNo7n9R4eA89Ov1u49a7MUKf5qCHsSM5L2cJY4xTNeEH6fqzUjLFrw++1 4YzEmUxeyCHXsL2cUNQwdAsUrHQYrE4D0xXvO9mI/CLxcxoqh13/RoK0ONK/rL11Zm3r XKgLudvRjt34Jibz5paZrmxkqTocwOM6b8zLHytrBmdW9a+vhNGa5bS2u27i3dH/kG6Y cudzmh0/pGXjzic662/FlmFmVI6ve1hjH95msCPrC+VfJwDX0u9m2GSPg/ucbmblpaBg MPxGpfgAU0ojfHAa3RyA8Ep2Pm24TQO6RLnZnmpL282PLd6Q5Ylav03U1ke02YOjhU5i lCeg== 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 j15si6516226oii.163.2020.02.04.16.25.03; Tue, 04 Feb 2020 16:25:16 -0800 (PST) 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 S1727722AbgBEAYL (ORCPT + 99 others); Tue, 4 Feb 2020 19:24:11 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48353 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727537AbgBEAYL (ORCPT ); Tue, 4 Feb 2020 19:24:11 -0500 X-Originating-IP: 92.243.9.8 Received: from localhost (joshtriplett.org [92.243.9.8]) (Authenticated sender: josh@joshtriplett.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 565F140004; Wed, 5 Feb 2020 00:24:07 +0000 (UTC) Date: Tue, 4 Feb 2020 16:24:07 -0800 From: Josh Triplett To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Len Brown , Jonathan Corbet , Arjan van de Ven , "open list:DOCUMENTATION" , Linux Kernel Mailing List , ACPI Devel Maling List Subject: Re: [PATCH] acpi: button: Provide option for power button to directly signal init Message-ID: <20200205002406.GC2968@localhost> References: <20200111022145.GA166025@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 30, 2020 at 10:07:09PM +0100, Rafael J. Wysocki wrote: > On Sat, Jan 11, 2020 at 3:21 AM Josh Triplett wrote: > > > > Virtual machines and containers often use an ACPI power button event to > > tell the machine to shut down gracefully. > > > > Provide an optional, extremely lightweight way to handle this event by > > signaling init directly, rather than running a separate daemon (such as > > acpid or systemd-logind) that adds to startup time and VM image > > complexity. > > Well, I'm not convinced. I would be happy to talk through other possible options. > Even though the patch looks straightforward, the approach really is > quite not so conceptually and honestly it looks like a band-aid. I'm not sure what makes it conceptually non-straightforward. I'll freely admit that it isn't *elegant*. But it also seems inelegant to me to need to start and run an entire userspace daemon to watch for a key, or to add such logic into a domain-specific workload's setup and event loop. I'm entirely open to changing the approach. The goal I'm aiming for is to allow cloud systems and VMs that signal shutdown via an ACPI power button to run a more minimal userspace. > Also I'm not quite sure why the ACPI button driver is the target of > this and not the input layer, for instance. I don't have any objections to putting this in another part of the stack, but input in particular seems like it would potentially affect the normal event-processing path. - Josh Triplett