Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp560207iob; Wed, 18 May 2022 08:04:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxQWTfroRGVBPRJ9ZxbtdpWTyDyjnn91/fNN/Zuoqp8E1hIT3g7mc+Swu65tvlaBlQfAHR X-Received: by 2002:a17:902:b18e:b0:15f:b2c:6ca with SMTP id s14-20020a170902b18e00b0015f0b2c06camr57167plr.84.1652886275174; Wed, 18 May 2022 08:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652886275; cv=none; d=google.com; s=arc-20160816; b=d5Em5DtMAyLQjUk+iOEUI5H1kL8HLGGonCJRJRTO5wSKGjR9loDm//7wgtkEq5VZcV FE8duf1NMZsVGJ4BNidivy0Vxy2BbC2VRuRCIN178uH12KZxWJCkPyeaQ7gI8nxdxAR7 aCkSKsTq0FIPI7KCnE2EFKqUAeDUlmtpj5TyX8SYqTb5at2bKHmB/9lzJhsdQ7/Xccxs TsnGqXVbYgqNSEfzwVICgkGWsVk4effWhuKLNbXYiuias74UKwToa5P9qkJP6Cz4iV9f yfA7IxhRXfyl7Rnn02/mF083SyLpy1V2FC5VxlT8HJL2j2DCg2O4DpjmI33jY2tGaaRY q/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=ayfHAoqEtV8GWKK73lN72HvcNOrapmeyJaXzktDoFp4=; b=fVlaR1rlMwyvdtURo0tFzKWBOfDcgumP6er762e83DLQCqeOV7nxCDKRFxzl2t6WMR XHhFo0Twk/UOQQaVxsHzEjh/pEV3jFKREYBoejp+y30MV2oYUV75yTkzenhRWNdp5YUs 6IFe7dRCStfMyZQUMagT2kUMyA/QydF3AUE8kwiqGTMvB8aCs6h8hIep2hIPS4ePUWjH n8P6GtqGVlKwlUDKGpXfb5gc/K+L5GMFJc4+R3Guj02VzZjGhO3wbaSCFy1UgVM2/4gj jphSNKYmHG7IjOcbJTfLlpkC7TsTkVFB+sVWj9RBarzgOzUanEQWNoItN9Qu3Zt2zvDM pSqw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h12-20020a056a00170c00b0050d4265128dsi3813508pfc.313.2022.05.18.08.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 08:04:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F6EE1D3D3B; Wed, 18 May 2022 08:03:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239042AbiERPCv (ORCPT + 71 others); Wed, 18 May 2022 11:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238931AbiERPCt (ORCPT ); Wed, 18 May 2022 11:02:49 -0400 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09FC21D2FDF; Wed, 18 May 2022 08:02:49 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-2f16645872fso27702697b3.4; Wed, 18 May 2022 08:02:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ayfHAoqEtV8GWKK73lN72HvcNOrapmeyJaXzktDoFp4=; b=0i5R4c053As+/XsqizslXydUIJ3zc2GmYzYmsbGzyDsvfQEmDz9nt9BL9ZWLrk1iQm wK7buiSbeuJ0X7+02xpGS9WeyJidOBfWANio9IXfWqno+JILwfOZUIidLDmde9JXVoSH gc0d9hZAt3IeL5Ip7sr9anauGOAwDeAQyDukL0nyncEfQdjdQvKFCVR7Q9h7i/SDCIw1 NBL+gtRjMXVoGIkc3cmumb4bDHQDRtqI4mcUbExt1LQU5L1MMWGnu5UjxsuKqO/WOvig 3R5kX5gBS2eeWmD/ngH3zjA8AfbpMCSQVcbZQyleLYSMDSywIHSfA6ipfWUVxt56ggOW HCPA== X-Gm-Message-State: AOAM531dd/v7QHFtaJM8WIG9A0fl/0+SEV8/RdQHopAcHneknrjNb0DX aFvKVJOJspX5GLxmKp0cHqk6gz+Uu2cYL95AQRw= X-Received: by 2002:a81:91d4:0:b0:2fe:e300:3581 with SMTP id i203-20020a8191d4000000b002fee3003581mr19834231ywg.7.1652886168249; Wed, 18 May 2022 08:02:48 -0700 (PDT) MIME-Version: 1.0 References: <20220505015814.3727692-1-rui.zhang@intel.com> <20220505015814.3727692-8-rui.zhang@intel.com> <2dc4aa933d07add206a2aeefa15a4837aca6ff62.camel@intel.com> In-Reply-To: <2dc4aa933d07add206a2aeefa15a4837aca6ff62.camel@intel.com> From: "Rafael J. Wysocki" Date: Wed, 18 May 2022 17:02:37 +0200 Message-ID: Subject: Re: [PATCH 7/7] rtc: cmos: Add suspend/resume endurance testing hook To: Zhang Rui Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Kalle Valo , Alexandre Belloni , Linux PM , ACPI Devel Maling List , linux-rtc@vger.kernel.org, "open list:NETWORKING DRIVERS (WIRELESS)" , Daniel Lezcano , merez@codeaurora.org, mat.jonczyk@o2.pl, Sumeet Pawnikar , Len Brown Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-wireless@vger.kernel.org On Wed, May 18, 2022 at 4:45 PM Zhang Rui wrote: > > On Tue, 2022-05-17 at 17:14 +0200, Rafael J. Wysocki wrote: > > On Thu, May 5, 2022 at 3:58 AM Zhang Rui wrote: > > > > > > Automated suspend/resume testing uses the RTC for wakeup. > > > A short rtcwake period is desirable, so that more suspend/resume > > > cycles can be completed, while the machine is available for > > > testing. > > > > > > But if too short a wake interval is specified, the event can occur, > > > while still suspending, and then no event wakes the suspended > > > system > > > until the user notices that testing has stalled, and manually > > > intervenes. > > > > If the wakeup event occurs while still suspending, it should abort > > the > > suspend in progress, shouldn't it? But the above implies that it > > doesn't do that. > > > > If this is fixed, wouldn't it address the issue at hand? > > I think the rootcause of the original problem is that > 1. on some systems, the ACPI RTC Fixed event is used during suspend > only, and the ACPI Fixed event is enabled in the rtc-cmos driver > .suspend() callback > and > 2. if the RTC Alarm already expires before .suspend() invoked, we will > lose the ACPI RTC Fixed Event as well as the wakeup event, say 20 > seconds delay in freeze processes. Well, the RTC Fixed event can be armed in a PM/HIBERNATE notifier and if it fires before .suspend() runs, system wakeup can be triggered from there. > But, even if that problem is fixed, the suspend aborts and "fails" as > expected, this is still a problem for the suspend-automation scenario, > because the system actually can suspend successfully if we don't set > the RTC alarm too aggressively. And in PCH overheating case, surely we > will get false alarms, because we will never use a 60s+ rtc alarm for > suspend-automation. I'm not sure why this is a problem. It only means that occasionally the system will not reach the final "suspended" state, but that can happen regardless.