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 50B70C43334 for ; Tue, 28 Jun 2022 15:02:55 +0000 (UTC) Received: by lists.zx2c4.com (OpenSMTPD) with ESMTP id 2a594f6d; Tue, 28 Jun 2022 15:02:54 +0000 (UTC) Received: from sonic306-20.consmr.mail.gq1.yahoo.com (sonic306-20.consmr.mail.gq1.yahoo.com [98.137.68.83]) by lists.zx2c4.com (OpenSMTPD) with ESMTPS id ae5973cf (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Tue, 28 Jun 2022 15:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1656428570; bh=mJdxWi+vRg5mX2ammRonQra2G8KMb7ygMvIk+e3y9ss=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From:Subject:Reply-To; b=oL0go7DAuaFwQBzxvAj93d5o/SRTjNurU3QevVXsSEJxvo7Naj/0J+rNSfMdOvVLsbXQIJTgLgUCMJlU0HpKFx6gGK9IgnHONv6IJij+vdQjV6ecfmmbLwOdIjumy+0fQbsK0oG9uoW+5C7HxIjlr3BK4byXi+oNWczQp9HFN883jCjR0EzSS1D23qiEoH3byuhhARCoFcBPywWTnQBv0gzW2LVDgM0OIVqLSNFpWDvjoqS2lFSIurwF/S+22aH7CpNFfNS1vHakRqRd2/HI9C46cobOKtf9FPhbbw1Zm5jyeYnxIE2nSmowLa/xjdkZfrTXQXfg2yLIXIjWtynpSA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1656428570; bh=jCd3itgRr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Ut GSH9_xjTBg3yUgKAIfFBjo_nh_0wAsz.3zqzsB3VltPtlRVf4HoaUU3IRSH1mW5hI2S80YRd364B pzCnFbwJ1ipO4b_.gWo3ZUTFG8ZquVjbwg_EZhD3ntSUnZPz8EhdkBATSwv7u_Z.JvijpFFrkb_K P1mjNUZJlWW24M6xUwH1ujYMjMT1Us7WIVnoHpNc4UkvrkgBPiiqhjOEslIxwO4qIF011kCmq7cE n6GcMz4pk89_K_E4agOMiHeDqOMIqczXBLJ1ToDRSTzO.PsyIP_.KM.9QoS2yMpPGUrffuffuDPT SEA4drcmjW5CdPtDYMj397rnzeZYDZYf4I7jjIZc1hzpfE9bH4oBn1E1iimW2iSC0RGu9zfKAgj9 ckpl3gG0d9ywRx6HOg4zext5PJy00TW4GFhYpZ_HtSST9y5jZr4noxyXs4ri6TLx4xW3cjPSXVMc 45WAcQFycvAXDa0lDCmLxS2Hru6cT2w8nQE9jjZJ0g8DnhJfKCo..ORmue8lKBk7t6_iLwfOP.02 tSC8x7PbjGtYZGorfeXQT4YvWYonzHcgAT3BMHwcc9CCzpVoiuj6k X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Tue, 28 Jun 2022 15:02:50 +0000 Received: by hermes--production-ne1-7459d5c5c9-f2z7w (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f5e4bf9d72858dcfc86edb9d0d0ee251; Tue, 28 Jun 2022 15:02:44 +0000 (UTC) Date: Tue, 28 Jun 2022 11:02:40 -0400 From: "Alex Xu (Hello71)" Subject: CONFIG_ANDROID (was: rcu_sched detected expedited stalls in amdgpu after suspend) To: paulmck@kernel.org, rcu@vger.kernel.org, urezki@gmail.com, uladzislau.rezki@sony.com, Greg Kroah-Hartman , Arve =?iso-8859-1?b?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Hridya Valsaraju , Suren Baghdasaryan , linux-kernel@vger.kernel.org, "Jason A. Donenfeld" , wireguard@lists.zx2c4.com, Theodore Ts'o Cc: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, amd-gfx@lists.freedesktop.org References: <1656357116.rhe0mufk6a.none.ref@localhost> <1656357116.rhe0mufk6a.none@localhost> <20220627204139.GL1790663@paulmck-ThinkPad-P17-Gen-1> <1656379893.q9yb069erk.none@localhost> <20220628041252.GV1790663@paulmck-ThinkPad-P17-Gen-1> In-Reply-To: <20220628041252.GV1790663@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Message-Id: <1656421946.ic03168yc3.none@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.20280 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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" Excerpts from Paul E. McKenney's message of June 28, 2022 12:12 am: > On Mon, Jun 27, 2022 at 09:50:53PM -0400, Alex Xu (Hello71) wrote: >> Ah, I see. I have selected the default value for=20 >> CONFIG_RCU_EXP_CPU_STALL_TIMEOUT, but that is 20 if ANDROID. I am not=20 >> using Android; I'm not sure there exist Android devices with AMD GPUs.=20 >> However, I have set CONFIG_ANDROID=3Dy in order to use=20 >> ANDROID_BINDER_IPC=3Dm for emulation. >>=20 >> In general, I think CONFIG_ANDROID is not a reliable method for=20 >> detecting if the kernel is for an Android device; for example, Fedora=20 >> sets CONFIG_ANDROID, but (AFAIK) its kernel is not intended for use with= =20 >> Android userspace. >>=20 >> On the other hand, it's not clear to me why the value 20 should be for=20 >> Android only anyways. If, as you say in=20 >> https://lore.kernel.org/lkml/20220216195508.GM4285@paulmck-ThinkPad-P17-= Gen-1/, >> it is related to the size of the system, perhaps some other heuristic=20 >> would be more appropriate. >=20 > It is related to the fact that quite a few Android guys want these > 20-millisecond short-timeout expedited RCU CPU stall warnings, but no one > else does. Not yet anyway. >=20 > And let's face it, the intent and purpose of CONFIG_ANDROID=3Dy is extrem= ely > straightforward and unmistakeable. So perhaps people not running Android > devices but wanting a little bit of the Android functionality should do > something other than setting CONFIG_ANDROID=3Dy in their .config files. = Me, > I am surprised that it took this long for something like this to bite you= . >=20 > But just out of curiosity, what would you suggest instead? Both Debian and Fedora set CONFIG_ANDROID, specifically for binder. If=20 major distro vendors are consistently making this "mistake", then=20 perhaps the problem is elsewhere. In my own opinion, assuming that binderfs means Android vendor is not a=20 good assumption. The ANDROID help says: > Enable support for various drivers needed on the Android platform It doesn't say "Enable only if building an Android device", or "Enable=20 only if you are Google". Isn't the traditional Linux philosophy a=20 collection of pieces to be assembled, without gratuitous hidden=20 dependencies? For example, [0] removes the unnecessary Android=20 dependency, it doesn't block the whole thing with "depends on ANDROID". It seems to me that the proper way to set some configuration for Android=20 kernels is or should be to ask the Android kernel config maintainers,=20 not to set it based on an upstream kernel option. There is, after all,=20 no CONFIG_FEDORA or CONFIG_UBUNTU or CONFIG_HANNAH_MONTANA. WireGuard and random also use CONFIG_ANDROID in a similar "proxy" way as=20 rcu, there to see if suspends are "frequent". This seems dubious for the=20 same reasons. I wonder if it might be time to retire CONFIG_ANDROID: the only=20 remaining driver covered is binder, which originates from Android but=20 is no longer used exclusively on Android systems. Like ufs-qcom, binder=20 is no longer used exclusively on Android devices; it is also used for=20 Android device emulators, which might be used on Android-like mobile=20 devices, or might not. My understanding is that both Android and upstream kernel developers=20 intend to add no more Android-specific drivers, so binder should be the=20 only one covered for the foreseeable future. > For that matter, why the private reply? Mail client issues, not intentional. Lists re-added, plus Android,=20 WireGuard, and random. Thanks, Alex. [0] https://lore.kernel.org/all/20220321151853.24138-1-krzk@kernel.org/