From patchwork Mon Nov 28 13:20:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 26752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5656941wrr; Mon, 28 Nov 2022 05:14:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6LS3MIsFubnbICcGdpCxyuHJxaLjMHT5bCLD9DiG1BZ5TTvTfTEVVuDpSi+FjxrSOdFUtS X-Received: by 2002:a63:155e:0:b0:476:95a8:de91 with SMTP id 30-20020a63155e000000b0047695a8de91mr26997887pgv.102.1669641278035; Mon, 28 Nov 2022 05:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669641278; cv=none; d=google.com; s=arc-20160816; b=u/0XEDndZdJG1ghVBjXEyMtj1hHbVmXOHFSqe3eynDEyFHMw7BN9vYatHa6VxtFC8D dkpxk3eJXKkrn3lTN/dhy9E9Td2N+uIrotjb8iNyo0Uuaw1o0WkojUajjsHMHvNQnTvP /7Lg5kXQXkTRUOp4kSkom15Cwpi3QjT6NlXgGBgJ+Zavi7wEQuDDtnq+aPGqLgt+kP2E yFJV6fv54R1qexE6b2Q1IUFFFyPczijoQ2AgwyNyziUoz0vokLDqyJOKnTcYkJEDNbDH BawXeHN4y720XsMwDW8UPwdaL91AF+l7wo+fh7Y47LbZA9UStwq/YU+e+BHiOtc7tcXh uyUQ== 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=oPK1MF5KUETm/siFAkp5nqNalPGNEYIoQPdZ+1qM8N0=; b=wHvJ2ERC41L3pKB2LGiRbhxXnG8yaZawPVgwajacdMuqIXqrNvXDLxXmOKXHBUuxPp 4FlYwn0GGRcHwDJbzeA8VCRsIOwKxogKakuJ9bYQtx1qWDPXKLUk/XLRB19ikJIuhBYy GJqJX+YhgHewOSwOtWhkDPiBcTz50y+Ft3Y1R5X55aypS9atzLrEd2RyhBgKHddRwUSs 76QE34oV7LK5n56iWznG8TrQkWyTP9tTE6gfs63EyUs7qtKWIrNizGv5W9Qdp0rUuLsY +nqjGlw8R1ojBRC8/hN50Kx8dMxmkU3JP9lGWkReZ/8fXF2iHFudYf+uozKGqVQ4DX+r ExNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MFqN/Seu"; 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 k6-20020a17090a39c600b00212d79c548bsi11140953pjf.82.2022.11.28.05.14.20; Mon, 28 Nov 2022 05:14:38 -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="MFqN/Seu"; 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 S231718AbiK1NNx (ORCPT + 99 others); Mon, 28 Nov 2022 08:13:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbiK1NNg (ORCPT ); Mon, 28 Nov 2022 08:13:36 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30DEFE66; Mon, 28 Nov 2022 05:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669641215; x=1701177215; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=IPfAz2o04h3wMx9MPOZMNtyWtq/ctVtFFpyHR+YbVE4=; b=MFqN/Seue60Te17UU6g1FX7dvMqWh65ZFIrG2uEvFCXNdZg+iMovFME0 aoiqctpQnp2v+2eGPxRaiZVWzq3FsUh1kE2qwAw4DpOXYdCoPbnEEpKuu K7iRKfzBJQnovxtDG9zZ560tt6wogH3U4R/kjTND/cWPopURCK4PFB1rC GA3marC4rnpWf9pQODn8DBQHUNMdZboRjCj/wlKvAfRtDaIY1IWvgrDhC iAqtbXGDZSzo0IIq3qcOvy+Ui+NeQadxix1PtZEk2Jf+yo4baPCIpwYSL fxHOHSXSmOwfde7g6Ihtw8E4IQ4LGqPbTeRdBBabhKapvm7wzJbO5r1Kf w==; X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="401117095" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="401117095" 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="749381339" X-IronPort-AV: E=Sophos;i="5.96,200,1665471600"; d="scan'208";a="749381339" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2022 05:13:32 -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 05/22] sched/core: Update the IPC class of the current task Date: Mon, 28 Nov 2022 05:20:43 -0800 Message-Id: <20221128132100.30253-6-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?1750745772873199800?= X-GMAIL-MSGID: =?utf-8?q?1750745772873199800?= 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: 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: * 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 8bb6f597c42b..2cd409536b72 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5496,6 +5496,9 @@ void scheduler_tick(bool user_tick) unsigned long thermal_pressure; u64 resched_latency; + if (sched_ipcc_enabled() && user_tick) + arch_update_ipcc(curr); + arch_scale_freq_tick(); sched_clock_tick();