Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp676146imm; Wed, 8 Aug 2018 03:57:31 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzQDpBwCemS4oKS3R5NOBwKK2OK2sUHds4G0S0Uoqxvdh9phWRIsNkZDBJ93fqVcMjxU3kO X-Received: by 2002:a17:902:3124:: with SMTP id w33-v6mr2090124plb.235.1533725851826; Wed, 08 Aug 2018 03:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533725851; cv=none; d=google.com; s=arc-20160816; b=PSv9l3TMG4JsY2JrjXAEd6j5ribW13mNHDbQ+cVtMRWW3xQwBTc6BAYZ41WyWKEax8 XcvU7zBba/FrodfkgHsJgKbvL6aa459M4jSbXFrS45n6VoENrI02zmN4l1N+ZzD2sXiy v1NI5ESi6GF2UVIJ/gXgTStw+oFPhbUUv7afoiU6H6ThVOH71DyUP+uy1aDJekGIxC+V H+5oTD56U+2Yx2MeAbEppTQujB4YcsYcND3XTyUuwIN10H1/7JPU8mCiZKlaUkt6En37 ePwFcL68eJur+DSeRRZE6Oxel1u0ToimUTuXAtESY0u8PaMW4w7YeaYd5+AQ45Z/LfNA QPnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=39t5i1K8MXWDyCWOygliu/gH9jMw37PeowKrlEn3LGI=; b=oJerhDJNyPTlQFHJRHQw2zyGAl3gy83VXdMywOcvd9bVOoI/9RDDBUJ0h0vs2OLhLy /L8iHOgrrTYJ86BDQv3Q+K96XMb92J8aFO+3TzY/CfdBLdPH99PDo9nCVesRquye9fC+ QrG4eaqXOUxP9dzGLqpBJIQuIHusIwPeh2FkCLRajrC2ARAsrtZsLkUlO8Ge1hmSEPNy Y8QGNxyHBcF+nIYpLe2wXvafZATWHWEwLa41cJL1t6eteL9pgx7cVFSJDvXWrJpXZOzO bKdBAUCzzCxiq8rDCw4nL/YOAQFr4kO6PC0E4XveTpA1LM5SjtKAmezr3yNdVqT+9SMG 5n7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15-v6si3833193pgh.593.2018.08.08.03.57.17; Wed, 08 Aug 2018 03:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbeHHNPg (ORCPT + 99 others); Wed, 8 Aug 2018 09:15:36 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:37106 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726697AbeHHNPg (ORCPT ); Wed, 8 Aug 2018 09:15:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D883318A; Wed, 8 Aug 2018 03:56:25 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.emea.arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2AC03F2EA; Wed, 8 Aug 2018 03:56:22 -0700 (PDT) Date: Wed, 8 Aug 2018 11:56:19 +0100 From: Lorenzo Pieralisi To: "Rafael J. Wysocki" Cc: Ulf Hansson , "Rafael J. Wysocki" , Sudeep Holla , Mark Rutland , Linux PM , Kevin Hilman , Lina Iyer , Lina Iyer , Rob Herring , Daniel Lezcano , Thomas Gleixner , Vincent Guittot , Stephen Boyd , Juri Lelli , Geert Uytterhoeven , Linux ARM , linux-arm-msm , Linux Kernel Mailing List Subject: Re: [PATCH v8 09/26] kernel/cpu_pm: Manage runtime PM in the idle path for CPUs Message-ID: <20180808105619.GB25150@e107981-ln.cambridge.arm.com> References: <20180620172226.15012-1-ulf.hansson@linaro.org> <2056372.NMt4aPaF4h@aspire.rjw.lan> <2205807.cU2puvubpP@aspire.rjw.lan> <1726374.375PCQfjLZ@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 06, 2018 at 11:37:55AM +0200, Rafael J. Wysocki wrote: > On Fri, Aug 3, 2018 at 1:42 PM, Ulf Hansson wrote: > > [...] > > > >>> > >>> Assuming that I have got that right, there are concerns, mostly regarding > >>> patch [07/26], but I will reply to that directly. > >> > >> Well, I haven't got that right, so never mind. > >> > >> There are a few minor things to address, but apart from that the general > >> genpd patches look ready. > > > > Alright, thanks! > > > > I will re-spin the series and post a new version once 4.19 rc1 is out. > > Hopefully we can queue it up early in next cycle to get it tested in > > next for a while. > > > >> > >>> The $subject patch is fine by me by itself, but it obviously depends on the > >>> previous ones. Patches [01-02/26] are fine too, but they don't seem to be > >>> particularly useful without the rest of the series. > >>> > >>> As far as patches [10-26/26] go, I'd like to see some review comments and/or > >>> tags from the people with vested interest in there, in particular from Daniel > >>> on patch [12/26] and from Sudeep on the PSCI ones. > >> > >> But this still holds. > > > > Actually, patch 10 and patch11 is ready to go as well. I ping Daniel > > on patch 12. > > > > In regards to the rest of the series, some of the PSCI/ARM changes > > have been reviewed by Mark Rutland, however several changes have not > > been acked. > > > > On the other hand, one can also interpret the long silence in regards > > to PSCI/ARM changes as they are good to go. :-) > > Well, in that case giving an ACK to them should not be an issue for > the people with a vested interest I suppose. Apologies to everyone for the delay in replying. Side note: cpu_pm_enter()/exit() are also called through syscore ops in s2RAM/IDLE, you know that but I just wanted to mention it to compound the discussion. As for PSCI patches I do not personally think PSCI OSI enablement is beneficial (and my position has always been the same since PSCI OSI was added to the specification, I am not even talking about this patchset) and Arm Trusted Firmware does not currently support it for the same reason. We (if Mark and Sudeep agree) will enable PSCI OSI if and when we have a definitive and constructive answer to *why* we have to do that that is not a dogmatic "the kernel knows better" but rather a comprehensive power benchmark evaluation - I thought that was the agreement reached at OSPM but apparently I was mistaken. As a reminder - PSCI firmware implementation has to have state machines and locking to guarantee safe power down operations (and to flush caches only if necessary - which requires cpu masks for power domains) and that's true whether we enable PSCI OSI or not, the coordination logic must be in firmware/hardware _already_ - the cpumasks, the power domain topology, etc. I agree with the power-domains representation of idle-states (since that's the correct HW description) and I thought and hoped that runtime PM could help _remove_ the CPU PM notifiers (by making the notifiers callbacks a runtime PM one) even though I have to say that's quite complex, given that only few (ie one instance :)) CPU PM notifiers callbacks are backed by a struct device (eg an ARM PMU is a device but for instance the GIC is not a device so its save/restore code I am not sure it can be implemented with runtime PM callbacks). Lorenzo