From patchwork Tue Feb 7 05:10:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 53671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2652865wrn; Mon, 6 Feb 2023 21:02:55 -0800 (PST) X-Google-Smtp-Source: AK7set8L4Nj3T5ZdR2DPH93yWMGIZaJglbKbrjajdtFyDnvjI/N//qwcb4RDg4tcog4uYWPqBmZe X-Received: by 2002:a17:902:ec85:b0:199:2ae2:5842 with SMTP id x5-20020a170902ec8500b001992ae25842mr1809473plg.17.1675746175294; Mon, 06 Feb 2023 21:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675746175; cv=none; d=google.com; s=arc-20160816; b=FHiGfVTPRwMyVR2JjMoMBE3mT27CL4/dXnJHfZvXVyD6RB2vIkR7nu/tMLMfNVaPZE ChCmg1zreRAs+EQKBcjqGRJtLDT/4nw2gGm93nRwhGYVvIDNZg1S2GmFBC6ZUocDwJ0x CwUmkQWSZYLHhP8dV0nzYaz8g8pEXKKZo7l/QN+p0PApmf1Yy22q9k4KBSvg46MxiWG1 Zw+jDgMX8FGPLc6Nl4xZaTDAytjaEPehvdWN8dU7NZLa3LRCixn0P7bvzQuUM1xTh1UT x6vV6FImkB5pvT8tU9QmuD7nB6UUBMMPclHvUqDx8O9kXO5Pn7QcMf1RviJpGWpi4eSS OBSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Iz2qwbPrQ7JpBrZTMbknLbeIspToohjVhIhGf2oRC98=; b=P0KJcVFIbuPMUtVKvlNjDU2W9lu79NEoMaBZ1vS9ZP/0C31iSCvo7nLGOd+jOzL952 /RT3CcliIAuR3fngHxsYiym7ODuYzjGHx5rsW2gVhXwY5CIP4+NCm0HEaHEL4bD4XXge aUnAAB/4vhxGc8pexfDOPxMQdibvKK/bI4aktIort/R+dUsXdPemmbqz5Yy3Iai1s3Fx B6UM8szNl2hwcRvAeaEDav3/9qgkbo/mlIzrd//ZArHzyf/dkH2D2mTLh5JHkesyVt6s YX1Ce6Y8nnh5/cTNrPz6Mi5qTqK5NpBNzqwIKsEd8e7W46f0QtJ6sldFGmcKROFPEcuJ f8aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RdDab7YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170903121200b00194d0ae0eedsi9070816plh.546.2023.02.06.21.02.42; Mon, 06 Feb 2023 21:02:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RdDab7YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230199AbjBGFCH (ORCPT + 99 others); Tue, 7 Feb 2023 00:02:07 -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> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757147221450242771?= X-GMAIL-MSGID: =?utf-8?q?1757147221450242771?= 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