From owner-freebsd-acpi@freebsd.org Sun Sep 27 08:04:39 2015 Return-Path: Delivered-To: freebsd-acpi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07EC19CF181 for ; Sun, 27 Sep 2015 08:04:39 +0000 (UTC) (envelope-from bounces+73574-3fe6-freebsd-acpi=freebsd.org@sendgrid.net) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42A8FE7B for ; Sun, 27 Sep 2015 08:04:37 +0000 (UTC) (envelope-from bounces+73574-3fe6-freebsd-acpi=freebsd.org@sendgrid.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=subject:to:references:cc:from:mime-version:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=FAs8owfUCEhe/YfxxXQyTbgquJE=; b=oseFC0yqaHZVL2H0CJ A+YK643fdwM4M1brgjYekYMCLCf/Evq93CetILhbhtrw0z7uHTL6H4pG4iwUN4JX 3ehUUUGCX6IV6NNMXN+Xok1XJSnNV6OA0qPsMkS7dq752wfQSqKtqfQldQ/yagUV e3JgNFfD5I1SyL7XH9LcWAg6A= Received: by filter0691p1mdw1.sendgrid.net with SMTP id filter0691p1mdw1.20686.5607A30C18 2015-09-27 08:04:28.212624292 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id ntbbmh3pS1WFDN6weNT9rg for ; Sun, 27 Sep 2015 08:04:26.585 +0000 (UTC) Received: (qmail 40176 invoked from network); 27 Sep 2015 08:04:12 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 27 Sep 2015 08:04:12 -0000 Received: (qmail 55085 invoked from network); 27 Sep 2015 08:04:06 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 27 Sep 2015 08:04:06 -0000 Subject: Re: disabling sleep when shutting down To: Ian Smith References: <55FA3848.7090802@freebsd.org> <55FB233D.2080000@FreeBSD.org> <55FB48E3.20401@freebsd.org> <55FC4F13.3090603@FreeBSD.org> <55FC57F9.3050702@yahoo.com> <55FE5D54.1030806@freebsd.org> <5601A863.5070406@FreeBSD.org> <560262BF.7090107@freebsd.org> <5602DE8D.3020102@FreeBSD.org> <560648A7.4030708@freebsd.org> <20150927024553.L29510@sola.nimnet.asn.au> <5606EA4A.3090705@freebsd.org> <20150927164605.U29510@sola.nimnet.asn.au> Cc: Jung-uk Kim , John Baldwin , "freebsd-acpi@freebsd.org" , Dan Lukes From: Colin Percival Message-ID: <5607A2F6.60204@freebsd.org> Date: Sun, 27 Sep 2015 01:04:06 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150927164605.U29510@sola.nimnet.asn.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: t2fXfoZHCw6vGsGKHqKxJ9qWwHSlQfPdDS+3+p6rOCuC391SmO4RrjfmTV15uQYsW5bGAbzcCJ2ZYS CGWT10KWYIksRBFWV8EyTWxkQ4SL08lIg3y+nnpM2iRypyFZ2e41YoxmECwbPs9y6Pkdt/4ls9HCy2 2lwc9xI552m9xX9JsIZPlcYhxM+u08E70p8g X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2015 08:04:39 -0000 On 09/27/15 00:07, Ian Smith wrote: > On Sat, 26 Sep 2015 11:56:10 -0700, Colin Percival wrote: > > Ok, so you're satisfied with having the suspend-disabling triggered by > > init (i.e., not happening until shutdown(8) reaches "now")? > > Sure, if you're satisfied that 'shutdown [..] now' - or hitting the > power button as Dan mentioned - then quickly closing the lid will lose > that race. As you say, with this mechanism in place, accessing it from > shutdown(8) would be straightforward if deemed necessary. So, yes. I'll check before committing, but I'd be very surprised if you could close the lid of a laptop in the window between hitting enter on 'shutdown -p now' and when init sets the sysctl. The code path is very direct... we should be talking a few ms at most. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid