From patchwork Tue Nov 8 03:03:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinivas pandruvada X-Patchwork-Id: 1307 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2448128wru; Mon, 7 Nov 2022 19:05:21 -0800 (PST) X-Google-Smtp-Source: AMsMyM6eF5dKs/wfsmTYAhhk6yJytLT6/+mIttBG69y6301GAHnwVX4ieqE3uGmytTIiYHDwQ/Pk X-Received: by 2002:a17:907:2c78:b0:7ad:8a7a:3749 with SMTP id ib24-20020a1709072c7800b007ad8a7a3749mr51010563ejc.55.1667876721699; Mon, 07 Nov 2022 19:05:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667876721; cv=none; d=google.com; s=arc-20160816; b=hCJgzvTYI00Zk/3HivIHDrF/h4rdD5xftZul7ydywKijyRD6VCTyORGg5g4A7sOWiL AHFO8HMdMBnUGZCwQnmUdiQzSDz9uKlK5YD/IpR7ZSYucOLcsOcwc+tBIN3NclHkG9oI PX2BlLyHwOSA6DxF7F5wJR2uD8EPb4k7+ldKuigU8rpbxoyfxuLoIgHHrk+/odlVzTd1 IXcQ5lzRbze3Rl4EcgCZSIMlcNsBKN9Tngpo6njKm4c7Z2FywIcBNrY+9XqU5+4/siNc 9ON4yX/kkUPqIb8Msz9PVEKIyAILVaGIQHUlkBJ0VUDsg1CMR1v/eUokG83lRo+QPRPg WKQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Z8lqsNdZMyVksvrMw0/k+AZtWFqIcVzuGxqycDuYmWU=; b=DmDyPKbX2kKL0X/9xwsJ6gCdzNIpuxVYCSkLvTS/OfTy/uzpYPjsWMiou9f0OJRjLv dZxo1A1cHs2G+Ld1/ux+0lhtsYSThYBPf1QARZfvHN2NL9SsEy5IVeV4WYZh1LYBEOX1 JBNwnIQMfuxP7p0NINkGlMPfy+7u3584Zpv/VwX5HRg2caIyPUa7cGIItcxGK6oym7ce P/ahGlntcsTgfk21SDmVxiEon0dA1vKvUTFyELVG9eLGPOr+OYVx5+DxeN1wEwn4/E+C QX46bhnVQCy9fcLl5ktY0JV7LMpvpeRubZacQnBNebSu0NrqsgammCenv4VEHzOw2Pr9 QJNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YmHia5Ia; 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 g22-20020a056402321600b00457166171c6si10864324eda.432.2022.11.07.19.04.58; Mon, 07 Nov 2022 19:05:21 -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=YmHia5Ia; 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 S233195AbiKHDEK (ORCPT + 99 others); Mon, 7 Nov 2022 22:04:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232897AbiKHDEH (ORCPT ); Mon, 7 Nov 2022 22:04:07 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A95A175A5; Mon, 7 Nov 2022 19:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667876647; x=1699412647; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=RSCSyC3+0rPXVEykyJ8qRmybLJBkbh35zjfMk+l0FmI=; b=YmHia5Ian7/wfgRJwx0K6x6H5kz5NaNL4ikFR27gUPtcVsBdEeUspPOJ CK8ZEcq9IjWSniJ66LviVY60QLWbtHKBUQRRmh3LS7j15Y+tZVBbIjyAy G0XN6U/Y1llUUJhq/PvDPnV9Cgi5LxD+3KWhu3FqXf1KtImUI9+/CFmoQ tFyEa6L4G6ZpXlE2MVib/XKbXBgTJf0krL0kkM+hhWtSHHy13kh1EwIBf QZlleDsCjY75gaH7+TKcn0cZp5fZGuOMm5XLy4IhbOxTs+hlr+9VnGFtU cH1cfm+6cKcRSd20Dh4XGSMFUk3iVOkszQb3wOXXbjzh5mt26kPh45W0I w==; X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="337310746" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="337310746" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2022 19:04:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10524"; a="638612669" X-IronPort-AV: E=Sophos;i="5.96,145,1665471600"; d="scan'208";a="638612669" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by fmsmga007.fm.intel.com with ESMTP; 07 Nov 2022 19:04:06 -0800 From: Srinivas Pandruvada To: rui.zhang@intel.com, rafael@kernel.org, daniel.lezcano@linaro.org Cc: amitk@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Srinivas Pandruvada Subject: [PATCH 0/4] Per CPU idle injection Date: Mon, 7 Nov 2022 19:03:38 -0800 Message-Id: <20221108030342.1127216-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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?1748895501358477457?= X-GMAIL-MSGID: =?utf-8?q?1748895501358477457?= This series introduces per CPU idle injection. In preparation for this enhance the existing powercap/idle_inject and modify intel_powerclamp to use this. Then add per core idle injection driver. Srinivas Pandruvada (4): powercap: idle_inject: Export symbols powercap: idle_inject: Add begin/end callbacks thermal/drivers/intel_powerclamp: Use powercap idle-inject framework thermal/drivers/intel_cpu_idle_cooling: Introduce Intel cpu idle cooling driver drivers/powercap/idle_inject.c | 26 +- drivers/thermal/cpuidle_cooling.c | 2 +- drivers/thermal/intel/Kconfig | 11 + drivers/thermal/intel/Makefile | 1 + .../thermal/intel/intel_cpu_idle_cooling.c | 262 ++++++++++++++++ drivers/thermal/intel/intel_powerclamp.c | 293 ++++++++---------- include/linux/idle_inject.h | 4 +- 7 files changed, 428 insertions(+), 171 deletions(-) create mode 100644 drivers/thermal/intel/intel_cpu_idle_cooling.c