Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1678407pxk; Tue, 1 Sep 2020 05:13:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMdMTXnzdFzA02PVTcz3kqzEc3o0qLBaAb+IvHbgSj0AyW8rAWXNIWDJZbxwtCo1615/mw X-Received: by 2002:a17:906:3f82:: with SMTP id b2mr1256558ejj.240.1598962400185; Tue, 01 Sep 2020 05:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598962400; cv=none; d=google.com; s=arc-20160816; b=sN2AIxakmjK0lhRI+0mD4qRmUvAqN0Becj8svap3Qaidc5lBAqWabHNNmjtmBgKuUt gemvziGV/54+WCqY8Ec3KLXaemUTndBAJ9I23jZuNqkC0/eTbQ6EgSVd336r9E7tM+Qa Lkp4tMpxW+4NVGqKoRloWOwuoxA4n3UP9G7Eikv3777Z+bWSXxSFqAAR6H7zFGKrNt6k l+kAXwneMw6XH1oLqJU8GihtDEFvVZmCQYpFl5InvX7Q4X1G7Ln/bMQWLSW9M/ZO8SdZ Q91987lIB+efaFRvcbARYbuHjxUAAtKx3SE8g4oFaKhc1kq+6DbIFXNSUcadYPOkhcUT D1LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=bS1viyL8NjfwjcMbt5ItRCCKbfY+WgWbL+lmwBqbddk=; b=GSZ/3UfOYsCtSzKsiPJWpn/dT0U0aq0e3YQnbbvfcNO+xePdt9K5LgidTaO2fNCCnQ fCWoqq1WhWaxi8LrSywhEuu6XQz8Tf06GwWccFmt415wMga0KUPdk3orNCWoT5u96CEN YKW/bMq9l7ETsS/ma0dDGHQWkO6Bl1lXdmh5mVFbPXeGy4OSNwH31rWfUqKnqCkZI5Zm 5bvHqjRsxW7e3PqKVwv4+SmbSVeKkilbelI0hF3YDUEfHhQu3xyjbZ0I1nNuoFKIF8kF s+rsO13Pgpis6Ucm8KMyfsQ0E2NVqGSJ95+Y4nqkKBqzVYa6iSPRu7a09fonzUqKAGfv YjHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si432374edy.81.2020.09.01.05.12.57; Tue, 01 Sep 2020 05:13:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727977AbgIAMIM (ORCPT + 99 others); Tue, 1 Sep 2020 08:08:12 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:42660 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728018AbgIAL5t (ORCPT ); Tue, 1 Sep 2020 07:57:49 -0400 Received: by mail-ot1-f67.google.com with SMTP id g10so885143otq.9; Tue, 01 Sep 2020 04:57:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bS1viyL8NjfwjcMbt5ItRCCKbfY+WgWbL+lmwBqbddk=; b=XCQGOoNfFs7MiAmmizNo4TWmVBcua3WaMZz7HcTQXw8pErpaf8/8UqzU5o8Tp2urpO FGyrXrTHYR1XQmgTVZi+60BVNpF7sI2M0gajqmo2AIXkPQsPoNobexCEikXHN3eqIw94 e1dVimrJKJKOR01Vpr0Ch25gfgHPbhYTgqD/yvWOuGR8uJD2hlhZG9m/TxIQptd/RypT 1MkCmkAlnW0b6nbN6zvkfmj+mx2RseZjyW1P1S88GY5B0whn3L4fNTEN2b2WYxi99tbu jgbtaUhY9aQcpOy2vmYdc8/FT+6XmJ8dQP+4uOtZe3umVF0aWjyq+xWrGxL/LeHVkmTn oHVw== X-Gm-Message-State: AOAM5330+LDVvHLTMO/w5s1GmWoxNlq4Dwt5cmz+uOGZJOdnlmLhMRZz GsdKY/qVKUDwhej8hczlpR2XqOpsqBFCBqASUgU= X-Received: by 2002:a9d:7e99:: with SMTP id m25mr1059559otp.118.1598961464586; Tue, 01 Sep 2020 04:57:44 -0700 (PDT) MIME-Version: 1.0 References: <1598943859-21857-1-git-send-email-claude.yen@mediatek.com> In-Reply-To: <1598943859-21857-1-git-send-email-claude.yen@mediatek.com> From: "Rafael J. Wysocki" Date: Tue, 1 Sep 2020 13:57:33 +0200 Message-ID: Subject: Re: [PATCH] PM: s2idle: Introduce syscore callbacks in s2idle flow To: Claude Yen Cc: "Rafael J. Wysocki" , Daniel Lezcano , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Matthias Brugger , Bjorn Andersson , Greg Kroah-Hartman , Stephen Boyd , Douglas Anderson , Linux PM , Linux Kernel Mailing List , Linux ARM , "moderated list:ARM/Mediatek SoC..." , wsd_upstream Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 1, 2020 at 9:05 AM Claude Yen wrote: > > This series based on 5.9-rc1 > This patch makes s2idle call existing syscore callbacks. Currently, > when s2idle is selected as system suspend method, callbacks hooked > by register_syscore_ops() will not be triggered. This may induce > unexpected results. They are not executed by design. > For example, sched_clock_suspend() was added to s2idle flow in > commit 3f2552f7e9c5 ("timers/sched_clock: Prevent generic sched_clock > wrap caused by tick_freeze()") to fix clock wrap problem. However, > sched_clock_suspend() is originally registered in syscore callback. I'm not sure why this matters here. > With this patch, if another syscore callback is needed in s2idle, > additional migration effort could be saved. s2idle cannot execute syscore callbacks, because it doesn' take non-boot CPUs offline and it won't do that. Thanks!