From patchwork Wed Sep 2 07:24:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248959 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp190879ilg; Wed, 2 Sep 2020 00:25:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBA8TnssOPIkGGD6FY/7Q2E1AIWRiRze4OFo7lgmZE0C2dZFzgSVEt57Tmkv3FJyggf6Tq X-Received: by 2002:aa7:d558:: with SMTP id u24mr5328075edr.336.1599031505302; Wed, 02 Sep 2020 00:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599031505; cv=none; d=google.com; s=arc-20160816; b=f3+0YdycHfSfGdR7dvs+hkSXomLLKbeJKdfjGr+R0OAkZ402H9SwEt5GVqGGizkrOK b0SWlvy9fwdAtfz31etm1ylu8v3R5Ra10t5YClw3JmzBzizUrw93pKkR5nygZVocRVK4 obwmiCh0ikN8vvBO9fLGMaAFGOVlPatDpMtahfld/kDC2tA2QiPDKJqJasOJ8mfq3kB5 ZdSm4YLkSdRNtk2yTUdmKE7OvISjdEXlRXs4645wZFu5UBrw8l9CjYwozsm975B/VOha HLmUBt/MIMslNDw9t6ayn9GZT2Rl/0Uizry5IR27xJH1gfgmlra/ctyVfQfakyqiLhgH kCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jzMZYoVKwDdmao+58sFzZ/CXFeupmKrayPkTlA4XixE=; b=wUG7rZPS2f3mUcc1J1xObG+4XccX7GVF3IWC2YUAUSsMgQ/svqtNFuumxmfvodpu9G oNNr+EtFlevybFrab22fODvWMztan/5BL5OIA+16GZA+srXOYXZXpUsY7Z9F2oO9UkO2 pwSjcWT2ZoPDbM5UY01xM7QfQQcYTgWMXohEgblI4p92Hj8+6gN0lOljhceh4j9eDTLb x1Ww7/JZRGGmB44Ieu5JGbS1s9PZqdfuGq2huCrl3wDqBga0z7BSoE1ZfwAdh1S/zbMg ueaF7YcoDsSFDpEbNi5lA00omg1D+C76wacDgmxFbE1wBaznp+pBhNYK5C/MLm5BH+6e l5Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="E0/BSbuS"; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si2053372edo.152.2020.09.02.00.25.05; Wed, 02 Sep 2020 00:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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=@linaro.org header.s=google header.b="E0/BSbuS"; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgIBHZB (ORCPT + 10 others); Wed, 2 Sep 2020 03:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726490AbgIBHY7 (ORCPT ); Wed, 2 Sep 2020 03:24:59 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3027C061245 for ; Wed, 2 Sep 2020 00:24:58 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id g6so1935084pjl.0 for ; Wed, 02 Sep 2020 00:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jzMZYoVKwDdmao+58sFzZ/CXFeupmKrayPkTlA4XixE=; b=E0/BSbuSPpbXLYOMMXyaUHNxnQ3tUzUVqYOpieWEbT2qOzkNODpjg9XY/ClTXLllz/ gmqTDGD1TqF4jmX/0icaIde6OBrsCAEJJWvktUPkgIQ3Abw7EY5nmYS2M8XXQwC+Vc1o kn83b7CBn/U7TapHGOgNskPmpoKC6RRYQjlxvJUpu8RjxCJlRe4T7lCJRXMV/g6N0IQP 7Hf4f6atIEUA9x06GnjmMfiVHz92M+w6iVP6+7ExTr6p9TqWmnaCATwADBfp5Ho0J3Au XXMdDsW9X+2X17BQlN5wS4w0ISNN+HfhyPLTDTMgdSzQPtTb2qhfH2UWRvVr4OtnyC6l 5fCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jzMZYoVKwDdmao+58sFzZ/CXFeupmKrayPkTlA4XixE=; b=AcTv6bUyhvSBb/AfuDeQZcBrK7/AfVcoxeRdAczbr2v5+xCiDWrKLFJvFb/PtVQ7wD hkbn4G3/t095bpDZOrXA1xUtCOL+J47moom3H8hAO1fNk8XamQWs7+v/PpzI5QNDdZQi mWnSuEV7D+fOUlGixTZTuOh3On/Y6qxbLKjzUNZghaz7Nek6QZ2Ff1mND1V31DsQmgdW lvQiIGYvJ9YcNIBj+VG2r45Qzgfv7LvzUS1nfsAFLrppZi/GlbdCk5qU4JFcE8IyTAHl Ffu+eIe3DDkr456yAjYIfcqrPoBNhRl/dBt4BSpa9KVICDKNUerHwS686T29qMswCSdH DUcQ== X-Gm-Message-State: AOAM530JpApPWjl6hllIuki5Ct0FLCUhl66Qq6kTKRN56m0UJFaLckQ7 baJXnw9KaH+xz9z76EW/NKOVuA== X-Received: by 2002:a17:902:ed14:: with SMTP id b20mr1030492pld.310.1599031498295; Wed, 02 Sep 2020 00:24:58 -0700 (PDT) Received: from localhost ([122.167.135.199]) by smtp.gmail.com with ESMTPSA id e2sm4272366pgl.38.2020.09.02.00.24.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2020 00:24:57 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Ben Segall , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Steven Rostedt , Vincent Guittot , Viresh Kumar Cc: linux-pm@vger.kernel.org, Lukasz Luba , cristian.marussi@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] cpufreq: Record stats with fast-switching Date: Wed, 2 Sep 2020 12:54:40 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi, We disabled recording cpufreq stats when fast switching was introduced to the cpufreq core as the cpufreq stats required to take a spinlock and that can't be allowed (for performance reasons) on scheduler's hot path. Here is an attempt to get rid of the lock and bring back the support. -- Viresh Viresh Kumar (4): cpufreq: stats: Defer stats update to cpufreq_stats_record_transition() cpufreq: stats: Remove locking cpufreq: stats: Enable stats for fast-switch as well cpufreq: Move traces and update to policy->cur to cpufreq core drivers/cpufreq/cpufreq.c | 16 +++++- drivers/cpufreq/cpufreq_stats.c | 87 ++++++++++++++++++++------------ kernel/sched/cpufreq_schedutil.c | 12 +---- 3 files changed, 72 insertions(+), 43 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af