Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp806923iog; Wed, 29 Jun 2022 10:33:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u3F85IdYTUibkqGBzqFzbxaK4iSl22tXf0p3f360ZDkTyzukKwZ4hCGCE4vooVdAdvYEcW X-Received: by 2002:a05:6a00:4107:b0:527:fbd1:ce54 with SMTP id bu7-20020a056a00410700b00527fbd1ce54mr2827172pfb.45.1656524013670; Wed, 29 Jun 2022 10:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656524013; cv=none; d=google.com; s=arc-20160816; b=hkalspGCbPghyCI/NkrQzhLitZvfWcZ+1Lv7XTK0i8s2PrDUKkaDXpZdkOK5z2VeR1 qau72DazQV97xFQevnr9uioYffkwVVk/QyAHzN/vBL5BauISFmJRSLpynspXDrcYaaXS FPqnUdRuSPXXC/Iosamh9t7Yy9dkx8mlPj7cmzqDsfCr12JX7xqlExHp3VRYkUC4ZGxV FE/hJNY8DaOYDEWJbAgzDFf+8PZy3fUFQOm3AbM0xjKBHzxJCghH410fofeznb4gal8F jHF/gd6IEgU/8xm8RKVeygn7nZG42PQTMBrYM0o5hX7JdayZBP+ik5Hg8iayu1tmjvfq Xj+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=frsUpauch2yef5qCffQ8/21ciOVdyCgGtkyY+MhGuEw=; b=RkT4ejRkrlTUtmyTFDTBqAWbj7JEQmoS70RVJ/ESmDPu1D88DKpG9fmC3rAd4HCBYE w3Qy9dtC+BT4/JuaerkX298MUkM/jT9fqMqa776qHVw5+tywx0kgUmKvaCcKldkkrGpN qbz6LhhnDhRgCwL1kdf/DHJcOoD93tX3plYZM0lUUwbDaz84wDNc+uc7ffH48IJ10REb jlNDBCXIm3nmIqQnpEewt67L2a77HChVU5k05Mcfq/v14IPr2LAv+9pPjBezNPz6rrn4 ZV3e49Z3AJhHNmV6lfk0OHm26G/fbJRIVFfp4R5R7CnsmXmp268abwre71Jt5m3PoWNu wBxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="R/8KZZgh"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a635c0d000000b003fe25580685si561857pgb.349.2022.06.29.10.33.20; Wed, 29 Jun 2022 10:33:33 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="R/8KZZgh"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbiF2RAe (ORCPT + 99 others); Wed, 29 Jun 2022 13:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiF2RAc (ORCPT ); Wed, 29 Jun 2022 13:00:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C54CF36165; Wed, 29 Jun 2022 10:00:30 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 81584B824F3; Wed, 29 Jun 2022 17:00:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CD3CC341C8; Wed, 29 Jun 2022 17:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656522028; bh=aX6BCoyP074w+Ec32Bjgq5Qkv6gXDTg4rIpA4hIZ24A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R/8KZZghPox1N6AUR6ZBSE/xv+dAqlVuAlzzf1S3mFLPeMy9gjW81Qyqgj5hKtmh0 gOq8T3dJN9HtFzu4y60WkiX/h+42A8rz4ss6j7sQqCOugsHjUjiiA0TCDfIx5GZwcg zjgxIcHxyzUujwVKft4QczxAtQNI2V1YozgZ1JTI= Date: Wed, 29 Jun 2022 19:00:25 +0200 From: Greg Kroah-Hartman To: "Jason A. Donenfeld" Cc: Christoph Hellwig , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , 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 mailing list , Netdev , rcu@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] remove CONFIG_ANDROID Message-ID: References: <20220629150102.1582425-2-hch@lst.de> <20220629161020.GA24891@lst.de> <20220629161527.GA24978@lst.de> <20220629163007.GA25279@lst.de> <20220629164543.GA25672@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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, Jun 29, 2022 at 06:52:08PM +0200, Jason A. Donenfeld wrote: > On Wed, Jun 29, 2022 at 6:45 PM Christoph Hellwig wrote: > > > > On Wed, Jun 29, 2022 at 06:38:09PM +0200, Jason A. Donenfeld wrote: > > > On the technical topic, an Android developer friend following this > > > thread just pointed out to me that Android doesn't use PM_AUTOSLEEP and > > > just has userspace causing suspend frequently. So by his rough > > > estimation your patch actually *will* break Android devices. Zoinks. > > > Maybe he's right, maybe he's not -- I don't know -- but you should > > > probably look into this if you want this patch to land without breakage. > > > > And it will also "break" anyone else doing frequent suspends from > > userspace, as that behavior is still in no way related to > > CONFIG_ANDROID. > > I don't know of any actual systems that do this for which > CONFIG_PM_AUTOSLEEP and CONFIG_ANDROID are both disabled. At least > that was what I concluded back in 2017-2018 when I looked at this > last. And so far, no other-handset-users have reported bugs. > > But of course I agree that this all could be improved with something > more granular somehow, somewhere. I don't really have any developed > opinions on what that looks like or what form that should take. > > However, the thing I do have a strong opinion on is that the change > you're proposing shouldn't break things. And that's what your patch > currently might do (or not!). I think that by the time the next kernel release comes out, and percolates to a real Android device, the years gone by will have caused those who care about this to fix it. In the meantime, this might actually fix issues in desktop distros that were enabling this option, thinking it only affected the building of a driver, not core power management functionality. So it's nothing to worry about now, I agree with Christoph, this config option should not be used for power management policy decisions like this. This should be controlled by userspace properly in the Android userspace framework, like all other Linux distros/systems do this. And worst case, Android kernels sometimes _do_ have a not-upstream config option that you can use to trigger off of horrible hacks like this. I'll leave the answer to what that is as an exercise for the reader :) thanks, greg k-h