Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3137464pxb; Tue, 12 Jan 2021 07:14:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJylxWAPgCf2/Zyloh0ZQEsYRiHCO6a7nyeXJdQN3j1wAlwtGOdZy5A7l7wS/Sc3TCBCmN9+ X-Received: by 2002:a17:907:11ca:: with SMTP id va10mr3404857ejb.78.1610464449382; Tue, 12 Jan 2021 07:14:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610464449; cv=none; d=google.com; s=arc-20160816; b=DMaqjXX2cNZcVpjZUtM8Fb9hNQqglBUywJBgHmC8VMjYfyZ54lGFfNRNlUBSjC9+wY 9o19XE2VxPmqx/Aycjbv+tJkSMktcIHSo1HdAutZTi/RhP6WSorbrA4JuUtLR0z5cTM9 QLQ0SnbrkJpr7PcosdtuM7rSTgC2FOLO5hW00+676zjiFLnafywPxtthK0ieak6jk1Nk r5jAjPQC4T4/vvW2l8ZQO9oFn60xK3JYbG44fjJJEleji4rs6lqm7iMQC3zxFyqFXIdR tIhK5GAb0qaPilKWjxc/O3Mwak+9kaJAMjLkxyXT/u00R0p60c6KI6yuBEogJ1+vsegR JdwA== 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=Cic+dKHjBRRPZEU7+Q8NLJL208GeD9ZlM4pd6J+pZ/8=; b=H4gyBF6jFUCKqbzn1umNW1zWiQr5lupJ9NPJ/K8mcXeq+U8aLkX+7G7A2wCSuiem29 RS2gmEv0PP0FyJY9MXrjf4ZE8LHVrDMcXT8uvCoo/G/OTJuOVO4+Y58llSmvvofmzRHj vqWhs74EYzp2V9cLWzP51IXlKh1xiTf1oY422c4gxKWbmF6kt0d5CJXTx/c3YbMdPjhj p5TmK/waNLjU136krtB7FVyeYZKTPPXquE8JlyDYkW4mCGiQz1Urhqh0SaIKP89rg7e1 8gPUtQTovskbuI3JX0PMhHyEV7TjHeClOFYcEUksbD1jc19h1GcZ9cupqNY9C72yrv3B l8Sw== 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 dj1si1446154edb.346.2021.01.12.07.13.44; Tue, 12 Jan 2021 07:14:09 -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; 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 S2389976AbhALPLV (ORCPT + 99 others); Tue, 12 Jan 2021 10:11:21 -0500 Received: from mail-ot1-f50.google.com ([209.85.210.50]:43952 "EHLO mail-ot1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbhALPLU (ORCPT ); Tue, 12 Jan 2021 10:11:20 -0500 Received: by mail-ot1-f50.google.com with SMTP id q25so2514404otn.10; Tue, 12 Jan 2021 07:11:05 -0800 (PST) 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=Cic+dKHjBRRPZEU7+Q8NLJL208GeD9ZlM4pd6J+pZ/8=; b=pX/VUKyWC/hDGUc2c51Gfgc4wEclB0AppwPpCUJewkbNxvX5UpNezHXtHG3zq49RxI AMYMGrklNZpFfRiAKmGFgV8x6lQEh7uzFRawCeMGpzVJduh2Qj52b4lJagwuqtGIZqYq 3qCxd+MD7y1Au8v6bNnVdnoCN6ElCdqU45EikH8PEtiy4LmArJfF0W3zi1zQrleNJ58I Xnvyw8dU3rzJIw77bervXHPAdWv4ay3dH1wq8stqGAmue2URQfFn9hgd4pvZNA0QxBYf 0MrN0faW7kA1ISCXwZGNYvERftQ8uG8O7NWp8fdGQ6/s3jYzVZuSy/Zjknd5+RzvVAgB SAfA== X-Gm-Message-State: AOAM530r0FTih1bHpR+jhNYDcrx+TAz2Dhsn1TyN41FnhGrX/3aHtP2w gEffNnJnICy8o0hc2xnVnIC3bfrgUHs/46Eb/FY= X-Received: by 2002:a9d:745a:: with SMTP id p26mr3206166otk.206.1610464239852; Tue, 12 Jan 2021 07:10:39 -0800 (PST) MIME-Version: 1.0 References: <1803209.Mvru99baaF@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 12 Jan 2021 16:10:28 +0100 Message-ID: Subject: Re: [PATCH] x86: PM: Register syscore_ops for scale invariance To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM , LKML , x86 Maintainers , Srinivas Pandruvada , Giovanni Gherdovich , Giovanni Gherdovich Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 4:02 PM Peter Zijlstra wrote: > > 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? That works, thanks!