From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 141BBC35247 for ; Wed, 5 Feb 2020 00:24:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7BDD2082E for ; Wed, 5 Feb 2020 00:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727673AbgBEAYL (ORCPT ); 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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