Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3130734pxb; Tue, 12 Jan 2021 07:06:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJmmlD+tfm53oOu3DQdu4NB91jS3X2nJdhF3+Y2PcrUhDhEhj/H5SX/ujMAdtt1VgzAOIQ X-Received: by 2002:a50:ab59:: with SMTP id t25mr3777406edc.364.1610463971556; Tue, 12 Jan 2021 07:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610463971; cv=none; d=google.com; s=arc-20160816; b=zBh8MmDW8zvOkIIGK3T4kW0neEAyPkztnLglA6SFqhJ2DEtzhFkWnrNSDRgEQ4SDCD 2/PfTDpa1sWHmoTfCMDcbkUlKJBz7/91EXcQ1zfJVe17NHZ9EpVfbpOyM1ZIm7cIA9Ug Xp+Lo4LnVeiBGQ96zvIuJjtHn3X52qV/AyZXnJ9VKMq4t2P14ukGgWt3WqiGtxj4bWzQ CXVw1g3OuMANBOmG5lcKD52dTX/4kY/zU2bFXs63mP+hgw1au6JjwLSTd8yuCKTytHJ7 tWxp7oZXvlseaA00cE7VTVFIBoYiIcl4QyvRs7WON7RFTpqNcEKySvZdq6FHRaXxVGRp 10oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0sGgaWxUWbmYiELyfxS8f48aZu+eQped+nqanx8s+sw=; b=SdF+8NcAMfoaw8Dfjlk5p2lhjgpt6CPCCuJeA3MkhDbID8j2TAQS2PstZfMXLGhO/8 RppoWt9Wo+ddO4n3algM+N0uQOhCSMxlc30b40T9egSaFodPAnqJ2if/PgwvpmeFFBlI ucw4bXu6Emi/PYmJlrvoCBoSHMpWDgS7SqJy4+WgideuXLLmRUajdPHXdxtOBULk6wZB 12O3W8vCJzCq3hI/3sHIbLLKirsbu9SfF6lF/cVn7/v/Sjbrk/MecIxfEdMvFRUReOWM qRWzOmbzR/omby/WdFXejEjwI1lcLQChFN7CMEt/H7tkDAWGOYfc8zjCmcpEBY3j6cpj OyaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ABUwrMYA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si1489801edo.164.2021.01.12.07.05.47; Tue, 12 Jan 2021 07:06:11 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ABUwrMYA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389835AbhALPC0 (ORCPT + 99 others); Tue, 12 Jan 2021 10:02:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387526AbhALPC0 (ORCPT ); Tue, 12 Jan 2021 10:02:26 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AED33C061575; Tue, 12 Jan 2021 07:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0sGgaWxUWbmYiELyfxS8f48aZu+eQped+nqanx8s+sw=; b=ABUwrMYAkyESdjSWcSwybKocQa 7Jj9wYYXjerOEETCCXJZxxcA5FN/6ByXmf9Zr3xOKZlqoNPmwMGm+1+dNXxpL7bBrwZl86FbiUDku Em3Ts8uY6lPcEW5GUlGQOViiYmO4WPlS6MnLSU4SleZW/NEs6tHgHljKafTwiRA5g/RZHQmzSJOc9 D7paS6Gm5WbiDG2L/pifQ6JAVQNRNIESVpmt1KTh//QBCqCzqjZbWX4JuqCitujoG8e9zh4MmV0ls zQiqoQQise/bRDHPUQWDwPbgS+FQqGS21ehKDOTCkObRrkXa0DTCrec4gCFwn1lHwqQhMyQjoEhAS IGnpYlBQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1kzLAR-004vhr-U3; Tue, 12 Jan 2021 15:01:22 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 19F70301A32; Tue, 12 Jan 2021 16:01:07 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0647E20C228EB; Tue, 12 Jan 2021 16:01:07 +0100 (CET) Date: Tue, 12 Jan 2021 16:01:06 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: Linux PM , LKML , x86 Maintainers , Srinivas Pandruvada , Giovanni Gherdovich , Giovanni Gherdovich Subject: Re: [PATCH] x86: PM: Register syscore_ops for scale invariance Message-ID: References: <1803209.Mvru99baaF@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1803209.Mvru99baaF@kreacher> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 08, 2021 at 07:05:59PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > On x86 scale invariace tends to be disabled during resume from > suspend-to-RAM, because the MPERF or APERF MSR values are not as > expected then due to updates taking place after the platform > firmware has been invoked to complete the suspend transition. > > That, of course, is not desirable, especially if the schedutil > scaling governor is in use, because the lack of scale invariance > causes it to be less reliable. > > To counter that effect, modify init_freq_invariance() to register > a syscore_ops object for scale invariance with the ->resume callback > pointing to init_counter_refs() which will run on the CPU starting > the resume transition (the other CPUs will be taken care of the > "online" operations taking place later). > > Fixes: e2b0d619b400 ("x86, sched: check for counters overflow in frequency invariant accounting") > Signed-off-by: Rafael J. Wysocki Thanks!, I'll take it through the sched/urgent tree?