Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D91A5C64EC5 for ; Tue, 7 Feb 2023 05:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230305AbjBGFC2 (ORCPT ); Tue, 7 Feb 2023 00:02:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjBGFBy (ORCPT ); Tue, 7 Feb 2023 00:01:54 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40DE5273; Mon, 6 Feb 2023 21:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675746110; x=1707282110; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=HuUFjeqT6UwPE0HFZg/3PfgKeD3R8aChweTbYJKxkt4=; b=QjCCsi4ZUGb6//og4Z/aoHF0/yhqe5A+FtwDlMIglvBgQHi0cXi4wzEJ Jynw7Ln5n6tP7vtOiA4e2DI2FWRkstmy+dsWhzA/71LphXv9pMCfDhGaD jN6gha8DnEde9QjaRdiuhycLBUHnY+50YhmrAbWUMQb2japJ31Lx2hjTK d5OMLkg6eiMxfxj0fvOSMIhfGFyhOx3iDpk8QFH/lHSEYmvustbPosyCv wxUzq9aDWABZCda6HcHDI5i3Qk7iU5GEpZAXvuQ9/IZqdVrhbBLLIcSj5 OwEwn3QU+5YD7NmkU7qUhsQsqICtTxkcrDjEcSLJlRmRBhMoUsoXUrDFW w==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="415625782" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="415625782" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 21:01:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="668657706" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="668657706" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga007.fm.intel.com with ESMTP; 06 Feb 2023 21:01:40 -0800 From: Ricardo Neri To: "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot Cc: Ricardo Neri , "Ravi V. Shankar" , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Len Brown , Mel Gorman , "Rafael J. Wysocki" , Srinivas Pandruvada , Steven Rostedt , Tim Chen , Valentin Schneider , Lukasz Luba , Ionela Voinescu , x86@kernel.org, "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ricardo Neri , "Tim C . Chen" Subject: [PATCH v3 05/24] sched/core: Update the IPC class of the current task Date: Mon, 6 Feb 2023 21:10:46 -0800 Message-Id: <20230207051105.11575-6-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230207051105.11575-1-ricardo.neri-calderon@linux.intel.com> References: <20230207051105.11575-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When supported, hardware monitors the instruction stream to classify the current task. Hence, at userspace tick, we are ready to read the most recent classification result for the current task. Cc: Ben Segall Cc: Daniel Bristot de Oliveira Cc: Dietmar Eggemann Cc: Ionela Voinescu Cc: Joel Fernandes (Google) Cc: Len Brown Cc: Lukasz Luba Cc: Mel Gorman Cc: Rafael J. Wysocki Cc: Srinivas Pandruvada Cc: Steven Rostedt Cc: Tim C. Chen Cc: Valentin Schneider Cc: x86@kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ricardo Neri --- Changes since v2: * None Changes since v1: * Removed argument smt_siblings_idle from call to arch_ipcc_update(). * Used the new IPCC interfaces names. --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 39d218a2f243..9f4e9cc16df8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5567,6 +5567,9 @@ void scheduler_tick(bool user_tick) if (housekeeping_cpu(cpu, HK_TYPE_TICK)) arch_scale_freq_tick(); + if (sched_ipcc_enabled() && user_tick) + arch_update_ipcc(curr); + sched_clock_tick(); rq_lock(rq, &rf); -- 2.25.1