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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A68C4C433E0 for ; Tue, 2 Feb 2021 09:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78C1564D87 for ; Tue, 2 Feb 2021 09:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbhBBJLu (ORCPT ); Tue, 2 Feb 2021 04:11:50 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:49832 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232728AbhBBJFx (ORCPT ); Tue, 2 Feb 2021 04:05:53 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id B645B1C0B76; Tue, 2 Feb 2021 10:04:52 +0100 (CET) Date: Tue, 2 Feb 2021 10:04:52 +0100 From: Pavel Machek To: Abel Wu Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, hewenliang4@huawei.com, wuyun.wu@huawei.com Subject: Re: [PATCH] PM: hibernate: add sanity check on power_kobj Message-ID: <20210202090451.GA27619@amd> References: <20210201075041.1201-1-abel.w@icloud.com> <20210201105243.GA23135@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2021-02-02 09:59:11, Abel Wu wrote: >=20 >=20 > > On Feb 1, 2021, at 6:52 PM, Pavel Machek wrote: > >=20 > > On Mon 2021-02-01 02:50:41, Abel Wu wrote: > >> The @power_kobj is initialized in pm_init() which is the same > >> initcall level as pm_disk_init(). Although this dependency is > >> guaranteed based on the current initcall serial execution model, > >> it would still be better do a cost-less sanity check to avoid > >> oops once the dependency is broken. > >=20 > > I don't believe this is good idea. If the dependency is ever broken, > > this will make failure more subtle and harder to debug. >=20 > Thanks for reviewing. I think the cmdline parameter initcall_debug will > help in this case. > Actually we are trying to make initcalls being called asynchronously to > reduce boot time which is crucial to our cloud-native business. And we > resolve this kind of dependencies by retrying failed initcalls. And this patch is okay if that gets mainlined, but not before. Best regards, Pavel =09 --=20 http://www.livejournal.com/~pavelmachek --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmAZFbMACgkQMOfwapXb+vKMsACfemy1Qj83ceejJNSRQ4aSJqaC aO0An2VkofaLO9/WlKkHvZWeT5mGsj// =nUX3 -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--