Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbbKJLCe (ORCPT ); Tue, 10 Nov 2015 06:02:34 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36876 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752244AbbKJLCc (ORCPT ); Tue, 10 Nov 2015 06:02:32 -0500 Message-ID: <5641CEC4.3080800@baylibre.com> Date: Tue, 10 Nov 2015 12:02:28 +0100 From: Axel Haslam User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Zhaoyang Huang CC: Kevin Hilman , Ulf Hansson , Lina Iyer , geert@glider.be, k.kozlowski.k@gmail.com, rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bcousson@baylibre.com, mturquette@baylibre.com, Axel Haslam Subject: Re: [PATCH v10 2/6] PM / Domains: core changes for multiple states References: <1445347589-5626-1-git-send-email-ahaslam@baylibre.com> <1445347589-5626-3-git-send-email-ahaslam@baylibre.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1537 Lines: 38 Hi Zhaoyang, > @@ -576,6 +584,8 @@ static void pm_genpd_sync_poweroff(struct > generic_pm_domain *genpd, > || atomic_read(&genpd->sd_count) > 0) > return; > > + /* Choose the deepest state when suspending */ > + genpd->state_idx = genpd->state_count - 1; > > if there is no governor configured, does it mean that we just try the > deepest one here? > If a governor is not configured, there is no way to choose between the states, and the state_idx will not change. so it will remain the one set at the genpd init function wich is the same as here: the deepest state. (state_count -1). In other words, if there is no governor, there is only one state: the deepest. About setting the deepest state in this particular place, My understanding is that this code will be called in suspend path, and in this case genpd_poweroff is not called, hence the genpd governor is not called either. Because there are many other things happening during suspend/resume, i think that suspend/resume is a slow procedure that will most likely not honor the device qos constraints, so i set the genpd to its deepest state. Regards Axel > genpd_power_off(genpd, timed); > > genpd->status = GPD_STATE_POWER_OFF; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/