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: 26751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5656855wrr; Mon, 28 Nov 2022 05:14:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QwonLSHtCMPFBNW64JVMSMx8phpUZn2AKFmOHB6JLtaOxePu29mjQ741hzZQmgqaFdp2+ X-Received: by 2002:a17:902:ea91:b0:189:6f76:9b5f with SMTP id x17-20020a170902ea9100b001896f769b5fmr13529936plb.56.1669641272047; Mon, 28 Nov 2022 05:14:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669641272; cv=none; d=google.com; s=arc-20160816; b=MljBVezg1afmdBiVzUY9UuSLK4zzct5HuGZzAK7meyk8XPcEiTLMJv9bbPJ6tAdhi7 S3vCU7wxf3xmcqAuGbQ1sT+RUaaOlmhj+5KxBIpo1sCmIB2tyfJWhKyIQ6cYDaTbuvC2 qGinYd+9wcm4aE/KGoBGXJ8/1cTVe0QhDBlmGU3rXIuMKZ3CQkKI1l2jk3cTnBIroV1H CAmHKMwzYjn7/W5kpz9++plB7bu/8R9CP0J6GY2HFzTV61HylsyrF0SoGf3a6hwyJ0/B CranZs1e80B9PwxPQihS1Gug8exwJpNpD+IFOMMhnhSCdgo/Il3nbTXuDdovnDgPj7eM Rx7Q== 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=W32Vi/LD1bOMM2BjPlo4QEBd1f/nyEH4e6c1SrnqUso=; b=AmR3k9hZSPQMe++E2DIxRF9aQ4ozGv64AD+ZPqTGLBeqxCuK3P7ztnHk+do/nZkqKW VRaXa6NmEFGbeyK9Z4M1W9vG3QZd7rWIMS1yoAgGLvAxhKTn/RAb77SaHxfwuOnqYmsh ycUXVQ2iSLxfBHxYbkRqvkoKlo9j/xmbGwlh4uUr8QdDJAOc+aNOdZorgzjdDHa7fgBQ rbulRa8Tg8EkvArIbqyfgzObww6OVbOF1AUT1RjLkkHaJMOb1owU8LpskT/EOYcQENCt TOClhXFno+kqQvZONExVUU4LL5pUHD195YCSW5UVxzy2ZD7gox6ZM9GQ2G2L2194cGY5 p6nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=V03l0WTH; 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 oo13-20020a17090b1c8d00b00218c8b6e5efsi13677570pjb.179.2022.11.28.05.14.13; Mon, 28 Nov 2022 05:14:32 -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=V03l0WTH; 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 S231703AbiK1NNt (ORCPT + 99 others); Mon, 28 Nov 2022 08:13:49 -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> 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?1750745766369044092?= X-GMAIL-MSGID: =?utf-8?q?1750745766369044092?= 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