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 41C0CC6379F for ; Tue, 7 Feb 2023 05:02:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230145AbjBGFCJ (ORCPT ); Tue, 7 Feb 2023 00:02:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjBGFBv (ORCPT ); Tue, 7 Feb 2023 00:01:51 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08D912709; Mon, 6 Feb 2023 21:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675746105; x=1707282105; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=aj6JFQKyLnSw7eTFaXzl39JTMTTiJ20FhjGa4KuYwkI=; b=RdDab7YVICyTccSdq8g41dZrfMgwXUNmpwT9xowLHToq8U5S8IjpowyJ 2PEr86LBp2l25Bek0y8B3/M/WB1PftNqGb5G0oVjzaHizwh6X9TYiyj4U oIKhyjywiTZs7f8Ro+TR0xRoT512tABTt/q68q7+CdtCshDf0SY5a9P5v Sfddl1YuDN3OX2u8L/FEE4ZaQAcC7ldPCUG/fN77n102+sLLqxW3tqV8T eCjO2Xu5+WDHl74d3IX0iBPgyEaZJq8UrhhNSm2brbNDO3Z8+vooo1xbC I6FXXBkdzDSUqShxG6Z5Yg7OSaTKpewWNEsjNQsSH6Fn3iC4un8o4ahNY A==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="415625761" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="415625761" 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:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="668657696" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="668657696" 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 03/24] sched/core: Initialize the IPC class of a new task Date: Mon, 6 Feb 2023 21:10:44 -0800 Message-Id: <20230207051105.11575-4-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 New tasks shall start life as unclassified. They will be classified by hardware when they run. 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: * None --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4580fe3e1d0c..ed1549d28090 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4428,6 +4428,9 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) p->se.prev_sum_exec_runtime = 0; p->se.nr_migrations = 0; p->se.vruntime = 0; +#ifdef CONFIG_IPC_CLASSES + p->ipcc = IPC_CLASS_UNCLASSIFIED; +#endif INIT_LIST_HEAD(&p->se.group_node); #ifdef CONFIG_FAIR_GROUP_SCHED -- 2.25.1