From patchwork Mon Nov 28 13:20:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 629387 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 059DBC43217 for ; Mon, 28 Nov 2022 13:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231432AbiK1NNr (ORCPT ); Mon, 28 Nov 2022 08:13:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231624AbiK1NNf (ORCPT ); Mon, 28 Nov 2022 08:13:35 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90105120A3; Mon, 28 Nov 2022 05:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669641213; x=1701177213; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=SGRJsWlMFBDt9YHKWDWh4VtdInjeycHfz68CW0YMoNE=; b=V03l0WTHV5S3FfrqNguzqJB+2yysCVjerBdkNqpNDS0sQrIsS8sZLIaN sSyY2JCBkkPJILUo6kgK304SCUfnjw/Dp4bTn8MgUagOG88dI4R9QQ3pA +9Ym90KFbjrggAafgIiATCA/E7bLKHEHiFn6wHUEXat2Eh/7AW01OpNkB Hp9Y8aH3r/CR5X9ZjydRdr4p2PB/dCa/eLjAHKNVk1DWptAwI+Q9a/ylf m9qfr6Gwcas3FbwWWARjUrG8GmcHV2TT4lfA/xlh1s4Vm33LIMghHmnes 6wI1QXQmUmCLC1Khr1ydkrDAjT5ioPmo0nDJV1apxSmlupUG0bmFcSSgY w==; X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="401117071" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="401117071" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2022 05:13:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="749381332" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="749381332" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2022 05:13:31 -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 , x86@kernel.org, "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ricardo Neri , "Tim C . Chen" Subject: [PATCH v2 03/22] sched/core: Initialize the IPC class of a new task Date: Mon, 28 Nov 2022 05:20:41 -0800 Message-Id: <20221128132100.30253-4-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221128132100.30253-1-ricardo.neri-calderon@linux.intel.com> References: <20221128132100.30253-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-pm@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: Joel Fernandes (Google) Cc: Len Brown 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 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 78b2d5cabcc5..8dd43ee05534 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4372,6 +4372,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