Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp889915iog; Wed, 29 Jun 2022 12:17:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tXdeZtU897Z85bz5kouXLHuaMdH8bZG3mLAAp4NjU6FUAEFf4NaY4XXEDFf1oaVKi+38tC X-Received: by 2002:a05:6a00:f8f:b0:525:537d:69b1 with SMTP id ct15-20020a056a000f8f00b00525537d69b1mr11797692pfb.52.1656530254265; Wed, 29 Jun 2022 12:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656530254; cv=none; d=google.com; s=arc-20160816; b=a+Jj0iFLou0vkL6UZauatR7RIdaSDWTQyhzptemBqrpfvHOWmr5+Kosn8yPSmdYGzo PVZ9aTPNYUjSbswVYqK24xwBqSOSx94pE2ERkdclMCWfVF8A9yCyWwl7T+jXRTbuH89L nmgMyRpOuGw15vqjyWuMYOz62LejwTugUSZCJHoqYfpyUb+GSpLXHLKh/iP6YY6NkLEp urV827t9g4/V6tCTXD3Jnhb1mzEc4pvavfm1xxfW5rjtXfh+6yx2AAKtOKaWnRCJ43hJ gmrNwtGL+HEYB6G004YMG7Eu7A1FTl8AwwrYsVtbY8LGNj19VmYEUXGvPCwPaZSx5cWe wltg== 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=0GeTuZBlfQ/Y+eNOOfDxK3ZM+hvemUe7AZCxhx5HzJ8=; b=MUwkEiaD5lhy9NvHFS8tmeVCEYOVyAr6X254pzwMDBwYgLHvyMZiK8evWT27+DjQRp CKGbVvL+eDKHE0Uita8d9CN5dmddU29ZMW8FJEGN8xwo0s7KQtheaRgbc+JT2wfx0tdD ahJi4mB1fUnXnckPEh4co9emY0y8HqbXA92fPC5zcA1SM6mH3JKGymHa7sR0FwvwjyIe VyaWxFyTS9hzjuW9X4lYEGuzM6SckfI7YYkF2VUQyrtZETbwPzz+9unVHAo7JAn/Qhrw +E71zG9sbPz206HOGw6bpWJ5DByP7DDvo0XOVskDM3fxTA5CMOBY2JBC7XnLi7l/PSzn Ghmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JJYOmj+a; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t32-20020a634620000000b0041183dcd4bfsi817565pga.147.2022.06.29.12.17.20; Wed, 29 Jun 2022 12:17:34 -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=@google.com header.s=20210112 header.b=JJYOmj+a; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229525AbiF2TFd (ORCPT + 99 others); Wed, 29 Jun 2022 15:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbiF2TFb (ORCPT ); Wed, 29 Jun 2022 15:05:31 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7CC11F61B for ; Wed, 29 Jun 2022 12:05:30 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id d14so16533318pjs.3 for ; Wed, 29 Jun 2022 12:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0GeTuZBlfQ/Y+eNOOfDxK3ZM+hvemUe7AZCxhx5HzJ8=; b=JJYOmj+afcpj4I6DhLvv1DJGSO9RU/r60gm7oBHP/z1whsgUGzshmjyS+68ykpAOrB PZMVASKhx3vYZgCdJaQmdVJhBWuZNtboZlCiQyj6WAMRN4Kvh07DF4VTpK0Sj27Lsl6/ B+YuMmqeZEeQs4/Hm/ALEzJa6KWlGaRQbzl9tn855YrjL5qXif4aSzoOgvxnIP9DSA9A AjCVE/CVQkZEpunegRnMqN99nSMRJRGN9GrvEGnWTqbNczB5UFxLzgL4Q0ol3VBjFalf WfkCL65+80IbqNSPjmY0C880X/KyGHWw3qCM01dlaIuQdT6x35pnOEkDo3rr7x3tH16d 1ARw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0GeTuZBlfQ/Y+eNOOfDxK3ZM+hvemUe7AZCxhx5HzJ8=; b=to5RRsqX0OKpOezXYFm5io8ZcXU6GbPemqJ5BqFutElsvqu0iAc+1NFfFyEpKKRbkx Ut8WdpdpohoFklVSwBP8bohlVLQ913t8bWxahGwS/ipNBQSZZVW9G+Hodcl5iX3Nn+53 jw27ZCTUI8CHiDwl8bGtZDKCE4l7PQjZw1ZLnml/v1WqZ+KjDFvKuQ8z6devahieG3BZ ZG/2S2aJdrqhDpTWibX3UW5+4AUFOWO16t0YztQaB0eg5XoM3VRiJK3qjde8QN1wDo0Z 371aXeFTYG+kqY0gqy5e5sqUR2NEe805nc9uWN6cQh66h0FuRBGogIakhXPsjDW6q991 0n2w== X-Gm-Message-State: AJIora/Idu3IjrjB0K7P+X1x1VSHTAsKuvgdgXtppMyqgnu8ayxhLUHL F2X7HaiUJHxL57CeVWBRfMnHvg== X-Received: by 2002:a17:902:f552:b0:16a:a17:a9bd with SMTP id h18-20020a170902f55200b0016a0a17a9bdmr10672461plf.97.1656529529720; Wed, 29 Jun 2022 12:05:29 -0700 (PDT) Received: from google.com ([2620:15c:211:200:1fe6:e5f3:8461:101c]) by smtp.gmail.com with ESMTPSA id e17-20020a63ee11000000b004119deff40dsm79889pgi.23.2022.06.29.12.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 12:05:28 -0700 (PDT) Date: Wed, 29 Jun 2022 12:05:23 -0700 From: Kalesh Singh To: "Jason A. Donenfeld" Cc: Christoph Hellwig , Greg Kroah-Hartman , 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 , linux-kernel@vger.kernel.org, wireguard@lists.zx2c4.com, netdev@vger.kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, sultan@kerneltoast.com Subject: Re: [PATCH] remove CONFIG_ANDROID Message-ID: References: <20220629150102.1582425-1-hch@lst.de> <20220629150102.1582425-2-hch@lst.de> <20220629161020.GA24891@lst.de> <20220629161527.GA24978@lst.de> <20220629163007.GA25279@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 07:34:58PM +0200, Jason A. Donenfeld 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. > > More details: https://cs.android.com/android/platform/superproject/+/master:system/core/libsuspend/autosuspend_wakeup_count.cpp;bpv=1;bpt=1;l=52?q=%22%2Fsys%2Fpower%2Fstate%22&start=51&gsn=sys_power_state&gs=kythe%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fsuperproject%3Flang%3Dc%252B%252B%3Fpath%3Dsystem%2Fcore%2Flibsuspend%2Fautosuspend_wakeup_count.cpp%23ftWlDJuOhS_2fn3Ri7rClxA30blj_idGgT12aoUHd1o > > So indeed it looks like it's userspace controlled. If you want this to > be a runtime, rather than a compiletime, switch, maybe > autosuspend_init() of that file could write to a sysctl. > > Who at Google "owns" that code? Can somebody CC them in? Hi Jason, Thanks for raising this. Android no longer uses PM_AUTOSLEEP, is correct. libsuspend is also now deprecated. Android autosuspend is initiatiated from the userspace system suspend service [1]. A runtime config sounds more reasonable since in the !PM_AUTOSLEEP case, it is userspace which decides the suspend policy. [1] https://cs.android.com/android/platform/superproject/+/bf3906ecb33c98ff8edd96c852b884dbccb73295:system/hardware/interfaces/suspend/1.0/default/SystemSuspend.cpp;l=265 --Kalesh > > Jason >