Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp48825iog; Wed, 29 Jun 2022 17:49:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ulbqJc3ecO5u428H/D/m/NxmsGUL77F1TPp/XZ1ZgKFXQzp8DsQR3dXp7GjjjgHy1hwmYs X-Received: by 2002:a63:4a41:0:b0:3fc:a671:f379 with SMTP id j1-20020a634a41000000b003fca671f379mr5385359pgl.594.1656550169259; Wed, 29 Jun 2022 17:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656550169; cv=none; d=google.com; s=arc-20160816; b=b3vO067Bunn8Eg/TXcKFMWm27HmtjnNrBSTxUSlfEkFp0oF/TArY06ltCcmdZThIC5 xe5tE/dhrK3gbt6pkyf2LYvqjoOcvtse2rj0H103ouw6tACz4UCoAYDTnfDaNvj+BUB3 60t2tJCsIPCeUvgMzMcCVzrYwhY1lEb0QWYeN8GzRD84Ei0oQ9rdx+xJAHKz/z2fgMvI zIhbqUhcMl1Vjo3YYdomJnukWWpN4/X1s1FZv2s97Pin89NZLJAMCyfYKwp+XD1jGsqu me1WNqR3rqNKHGvKVF1PslC5+MCUe/39hn75uJ3/R1Na52Oje6PLzEyaSgvbvRidZeFx b2nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=JYKpqZlNPmOXwyVhX6uOsB5A9QBH8uXwyXcnkRYcN7M=; b=BZ5ndlKJlbzItO08VNXmMOkY6zBAZYcxmtGdmDeqH/wRM/tB96svtVGLNKZBsp2JVe AkKkvYANNfJZRRQ5ql78WqQd9cV842AWMDv6aEVFdSI8rFViBw72qcwHBUNpYaXqkdsQ rCBOgxZREdMO+N3D9oqv6tXb3/wCK18qF16t0aLIaqjw7y2N2xH6+KDLRUVaYG8Bbk1D vTfXzwLBT+398DsSAt2DRjjKP+qxZYRfSOY0irAu60Gp89X84316PIbnuy5oagqVipis d0AOgBxDqTkhGqnux+njgCLF6sMIzy2x4ozfE7Og2lRuxYSHTqf+sSZqCckY4eQ1RFkT qBXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u38-20020a056a0009a600b005253c441681si23551988pfg.218.2022.06.29.17.49.17; Wed, 29 Jun 2022 17:49:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230334AbiF3AoH convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Jun 2022 20:44:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbiF3AoF (ORCPT ); Wed, 29 Jun 2022 20:44:05 -0400 Received: from relay3.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F38D832EF4 for ; Wed, 29 Jun 2022 17:44:04 -0700 (PDT) Received: from omf06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8B03D20F1B; Thu, 30 Jun 2022 00:37:09 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA id 2C2422000E; Thu, 30 Jun 2022 00:36:58 +0000 (UTC) Message-ID: <306dacfb29c2e38312943fa70d419f0a8d5ffe82.camel@perches.com> Subject: Re: [PATCH] remove CONFIG_ANDROID From: Joe Perches To: Kalesh Singh , "Jason A. Donenfeld" Cc: Christoph Hellwig , Greg Kroah-Hartman , Arve =?ISO-8859-1?Q?Hj=F8nnev=E5g?= , 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 , John Stultz , Saravana Kannan , rafael@kernel.org Date: Wed, 29 Jun 2022 17:36:57 -0700 In-Reply-To: References: <20220629161020.GA24891@lst.de> <20220629161527.GA24978@lst.de> <20220629163007.GA25279@lst.de> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 2C2422000E X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: 5uw4as89t5pkeunkfxcmzb44pcsr5u8p X-Rspamd-Server: rspamout06 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19mY8RNBqVwD0Nf7RscHoGyDK+vPHNZ/5M= X-HE-Tag: 1656549418-319526 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-06-29 at 16:19 -0700, Kalesh Singh wrote: > On Wed, Jun 29, 2022 at 4:02 PM Jason A. Donenfeld wrote: > > On Wed, Jun 29, 2022 at 03:26:33PM -0700, Kalesh Singh wrote: > > > Thanks for taking a look. I'm concerned holding the sys/power/state > > > open would have unintentional side effects. Adding the > > > /sys/power/userspace_autosuspender seems more appropriate. We don't > > > have a use case for the refcounting, so would prefer the simpler > > > writing '0' / '1' to toggle semantics. > > > > Alright. So I've cooked you up some code that you can submit, since I > > assume based on Christoph's bristliness that he won't do so. The below > > adds /sys/power/pm_userspace_autosleeper, which you can write a 0 or a 1 > > into, and fixes up wireguard and random.c to use it. The code is > > untested, but should generally be the correct thing, I think. > > > > So in order of operations: > > > > 1. You write a patch for SystemSuspend.cpp and post it on Gerrit. > > > > 2. You take the diff below, clean it up or bikeshed the naming a bit or > > do whatever there, and submit it to Rafael's PM tree, including as a > > `Link: ...` this thread and the Gerrit link. > > > > 3. When/if Rafael accepts the patch, you submit the Gerrit CL. > > > > 4. When both have landed, Christoph moves forward with his > > CONFIG_ANDROID removal. > > > > Does that seem like a reasonable way forward? > > Sounds like a plan. I'll clean up and repost your patch once the > Gerrit change is ready. trivial note: > > diff --git a/kernel/power/main.c b/kernel/power/main.c [] > > @@ -120,6 +120,23 @@ static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, > > > > power_attr(pm_async); > > > > +bool pm_userspace_autosleeper_enabled; > > + > > +static ssize_t pm_userspace_autosleeper_show(struct kobject *kobj, > > + struct kobj_attribute *attr, char *buf) > > +{ > > + return sprintf(buf, "%d\n", pm_userspace_autosleeper_enabled); This should use sysfs_emit no?