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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5733DC05027 for ; Wed, 8 Feb 2023 10:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xesGRySwSmKY/Ok0FGhO9QFHX7SAgHAdT0iAlSD+Ifk=; b=brOwOv7DfPdK/P 8CVtlkHvuW0EKXEhekQUXrCh/C6tXgYJwIS/ff3wQj+ZuQlJHJImMSMPRxorXLANLXR80KlQjYgyN YtqQmKTFRpsYazgOpKWwckZIHGNC74Jbb75UDmuj5/CE+Rzc8vui7YwVIvQKInJbf/tcgtS5wADyd U7d67wE8TWEZgkcbI9d63NiKsWFu/SEKuXzYyC0jB53mSak2zHnAG3fWnZfNe78CJ+Uz4An6Kg9kH ElUCF8HOlId20Tppm8wLreg4Bo3xoqV+2jQGyUF00n4nM6WC6Ee5Sia42Llbc0I+puWmwquVuVRnp /Y/cuHmDClwC6Ns7+Y2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPhnN-00FD8C-T4; Wed, 08 Feb 2023 10:35:21 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPhnL-00FD7b-2u for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2023 10:35:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 797611042; Wed, 8 Feb 2023 02:35:57 -0800 (PST) Received: from bogus (unknown [10.57.10.143]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 835903F8C6; Wed, 8 Feb 2023 02:35:13 -0800 (PST) Date: Wed, 8 Feb 2023 10:35:11 +0000 From: Sudeep Holla To: Kazuki Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Rafael J. Wysocki" , Daniel Lezcano , Lorenzo Pieralisi , Hector Martin , Sven Peter , Len Brown , Pavel Machek Subject: Re: s2idle breaks on machines without cpuidle support Message-ID: <20230208103511.w7jzxw6spy6humdn@bogus> References: <20230204152747.drte4uitljzngdt6@kazuki-mac> <20230206101239.dret3fv65cnzpken@bogus> <20230207194818.exskn3dhyzqwr32v@kazuki-mac> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230207194818.exskn3dhyzqwr32v@kazuki-mac> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230208_023519_212615_B4BEE971 X-CRM114-Status: GOOD ( 19.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 08, 2023 at 04:48:18AM +0900, Kazuki wrote: > On Mon, Feb 06, 2023 at 10:12:39AM +0000, Sudeep Holla wrote: > > > > What do you mean by break ? More details on the observation would be helpful. > For example, CLOCK_MONOTONIC doesn't stop even after suspend since > these chain of commands don't get called. > > call_cpuidle_s2idle->cpuidle_enter_s2idle->enter_s2idle_proper->tick_freeze->sched_clock_suspend (Function that pauses CLOCK_MONOTONIC) > > Which in turn causes programs like systemd to crash since it doesn't > expect this. Yes expected IIUC. The per-cpu timers and counters continue to tick in WFI and hence CLOCK_MONOTONIC can't stop. > > > > > 2. Suspend actually works on ARM64 machines even without proper > > > cpuidle (PSCI cpuidle) since they support wfi, so the assumption here is wrong > > > on such machines > > > > > > > Sorry I am bit confused here. Your point (2) contradicts the $subject. > drivers/cpuidle/cpuidle.c: > > bool cpuidle_not_available(struct cpuidle_driver *drv, > struct cpuidle_device *dev) > { > return off || !initialized || !drv || !dev || !dev->enabled; > } > > The cpuidle framework reports ARM64 devices without PSCI cpuidle as > "cpuidle not available" even when they support wfi, which causes suspend > to fail, which shouldn't be happening since they do support idling. Yes with just WFI, there will be no active cpuidle driver. [...] > > Again, since s2idle is userspace driven, I don't understand what do you > > mean by unbootable kernel in the context of s2idle. > > Sorry, I meant "attempts to fix this bug have all led to an unbootable > kernel." Again I assume you mean kernel hang or crash and nothing to do with boot. Once you enter s2i state with your changes/fix, it hangs or is unresponsive as it might have either failed to enter or resume from the state. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel