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 Received: from lists.zx2c4.com (lists.zx2c4.com [165.227.139.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96C88C433EF for ; Thu, 30 Jun 2022 00:36:33 +0000 (UTC) Received: by lists.zx2c4.com (OpenSMTPD) with ESMTP id 444eb090; Thu, 30 Jun 2022 00:30:20 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lists.zx2c4.com (OpenSMTPD) with ESMTPS id f938be47 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Thu, 30 Jun 2022 00:30:18 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4743161EDA; Thu, 30 Jun 2022 00:30:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59FBCC34114; Thu, 30 Jun 2022 00:30:11 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="BXiVvpR5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1656549009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4Om9TGEBMR+Wzn2zJmgsRZapqDIU0L40ndqIRFXkV40=; b=BXiVvpR5Pi7KTfGbJpg+nPbYbooUIVoLw8eEyN7163dOB1EbnKz7QiBOOJ7JwTc9uncem1 T4guem7e3CfAIl48sBFQ3KFFRNvt7gnxTMMBQgp1hNBUZJmOxdyIL+L9kpq/gSuFJemdiC kD2mYzTnyUGC4GP1T+hK3XTWueOzYtU= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 57a083cb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 30 Jun 2022 00:30:09 +0000 (UTC) Date: Thu, 30 Jun 2022 02:30:05 +0200 From: "Jason A. Donenfeld" To: John Stultz Cc: Kalesh Singh , Christoph Hellwig , Greg Kroah-Hartman , Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , Theodore Ts'o , "David S. Miller" , Eric Dumazet , Jakub Kicinski , "Alex Xu (Hello71)" , Paolo Abeni , Rob Herring , "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Shuah Khan , LKML , wireguard@lists.zx2c4.com, netdev@vger.kernel.org, rcu , "open list:KERNEL SELFTEST FRAMEWORK" , sultan@kerneltoast.com, android-kernel-team , Saravana Kannan , "Rafael J. Wysocki" Subject: Re: [PATCH] remove CONFIG_ANDROID Message-ID: References: <20220629163007.GA25279@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" Hey again, On Thu, Jun 30, 2022 at 2:24 AM Jason A. Donenfeld wrote: > 1) Introduce a simple CONFIG_PM_CONTINUOUS_AUTOSLEEPING Kconfig thing > with lots of discouraging help text. > > 2) Go with the /sys/power tunable and bikeshed the naming of that a bit > to get it to something that reflects this better, and document it as > being undesirable except for Android phones. One other quick thought, which I had mentioned earlier to Kalesh: 3) Make the semantics a process holding open a file descriptor, rather than writing 0/1 into a file. It'd be called /sys/power/ userspace_autosleep_ctrl, or something, and it'd enable this behavior while it's opened. And maybe down the line somebody will want to add ioctls to it for a different purpose. This way it's less of a tunable and more of an indication that there's a userspace app doing/controlling something. This idea (3) may be a lot of added complexity for basically nothing, but it might fit the usage semantics concerns a bit better than (2). But anyway, just an idea. Any one of those three are fine with me. Jason