Message ID | 20230205025902.2899734-1-srinivas.pandruvada@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1611195wrn; Sat, 4 Feb 2023 19:21:12 -0800 (PST) X-Google-Smtp-Source: AK7set851I5l8mzfQ4J0vzY/8hcpn548PPTS6v7zvtigdpnr/JZPV9K8LgWK8yANAqiQZG6DUrPu X-Received: by 2002:a17:903:1386:b0:199:ad4:6e64 with SMTP id jx6-20020a170903138600b001990ad46e64mr238791plb.10.1675567272582; Sat, 04 Feb 2023 19:21:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675567272; cv=none; d=google.com; s=arc-20160816; b=AHcKAWqv/s8WS5/T7dDT71mzL0Ek9UjVdVzcMx6Hd5+V91G+ZDG+D4mhVYA0kwAmKX pNotkv2P0WYXBUEx1T3YayF8WYUmJMZd3zGmBOACnW5kFbXmsz6637BUGJOOc+wCZwzN uVgwFDlsEx0+LJus+9sqJS8KDa+72/yZS2WgyQcKe+TAr5Iyjj4lN8AEwUS232C/qWQa 4vXpQon+6GPlf+ChZ/rpMf2roM1UPp5akrOr8OHi5sZ9NbZsykcZoD7Kk4x/eLPKLWcM OsyVjschCThXPz/K/atbxydToG//J3zvWlzAuQT3NFH3UGXTuiF5aymnqGK0zuhapi29 oppg== 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=HuQDmiOCTBLQF4tAt3KYC5HGacsHWsDhrziUssmHjZs=; b=zrvgXTJI3x3ripNQKemr5u2sqqO/ar1DEgny2c7tuHB2xk3beAwL86OCn8g8fv80SL 9BYmnViGHMYnBRUXMqs31oWdiNF/3zgu9bO1qAUmChc8u1Z4VHzafnidmElyXfpED2DD 5tNTZBXE6Zy0kK64I4uPSc1s+fvDAnOosGM9S3gCQ5DwXpETaR8mESjMnTVTQBU3EvIa RWdtHhMCSYj3r0IqEyHGN7UMTQPv7qxVPzNyQ1Py54r7rS3X5zc5rLttKdUnJnY6jfXk ov1IXuTO1+MoAj9CQz0HROWNtJMEu0uJ4XifHpxWrQRU62dWZW7VNDshnzG+/FDoJGy2 5N3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RXoWafzP; 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 j7-20020a170902758700b001960922af15si6356870pll.239.2023.02.04.19.21.00; Sat, 04 Feb 2023 19:21:12 -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=RXoWafzP; 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 S229596AbjBEC7K (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Sat, 4 Feb 2023 21:59:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjBEC7J (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 4 Feb 2023 21:59:09 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35BE4481; Sat, 4 Feb 2023 18:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675565948; x=1707101948; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GNH7lo4Wy4WNGKH6hRPPh/3G04IHu+IylJ90o+/5rmA=; b=RXoWafzPcU0UR6cA6s+SXZCFzEvGJqUxfs3OaLx7Qk8NbEEpPE5bPp3F m/ZS6M4OOpbva2oAJD/VFT+SlB4waXtZivRTvMm4gNCWXlSyURNq/vq4Q TFDYVWPC9URCw0fA19R4vSb5mR4FcWbj6ZQODtLzI3f9KHnS6AsiEoyxU g2yZRKsl3/NvZifDpm8zeYtS7YaN7P0L9lQ6zj0G5B+GzQhJdwYvjaLMO 7zK0yqZxq874jGOr+jYIAh2IeLKuFT1vjb5v6UgViIoYPmEk+tgKZJwoZ LRptAtB3DvcPsFWQNYMPXuNPnjxxqs0laFjes8ewivBmtxbHlBKpghmBf Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10611"; a="326705485" X-IronPort-AV: E=Sophos;i="5.97,274,1669104000"; d="scan'208";a="326705485" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2023 18:59:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10611"; a="666142165" X-IronPort-AV: E=Sophos;i="5.97,274,1669104000"; d="scan'208";a="666142165" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by orsmga002.jf.intel.com with ESMTP; 04 Feb 2023 18:59:08 -0800 From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> To: rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org, rui.zhang@intel.com, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Subject: [PATCH v2 0/2] intel_powerclamp: New module parameter Date: Sat, 4 Feb 2023 18:59:00 -0800 Message-Id: <20230205025902.2899734-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756959628760621998?= X-GMAIL-MSGID: =?utf-8?q?1756959628760621998?= |
Series |
intel_powerclamp: New module parameter
|
|
Message
srinivas pandruvada
Feb. 5, 2023, 2:59 a.m. UTC
Split from the series for powerclamp user of powercap idle-inject. v2 - Build warnings reported by Rui - Moved the powerclamp documentation to admin guide folder - Commit log updated as suggested by Rafael and other code suggestion Srinivas Pandruvada (2): Documentation:admin-guide: Move intel_powerclamp documentation thermal/drivers/intel_powerclamp: Add two module parameters Documentation/admin-guide/index.rst | 1 + .../thermal/intel_powerclamp.rst | 22 +++ Documentation/driver-api/thermal/index.rst | 1 - MAINTAINERS | 1 + drivers/thermal/intel/intel_powerclamp.c | 177 +++++++++++++++--- 5 files changed, 180 insertions(+), 22 deletions(-) rename Documentation/{driver-api => admin-guide}/thermal/intel_powerclamp.rst (93%)
Comments
Hi, Srinivas, First of all, the previous build error is gone. Second, I found something strange, which may be related with the scheduler asym-packing, so CC Ricardo. The test is done with pm linux-intel branch + this patch series on an ADL system. cpu0~cpu7 are Pcore cpus, cpu8-cpu15 are Ecore cpus, and intel_powerclamp is register as cooling_device21. 1. run stress -c 16 2. update /sys/module/intel_powerclamp/parameters/cpumask echo 90 > /sys/module/intel_powerclamp/parameters/max_idle 3. echo 90 > /sys/class/thermal/cooling_device21/cur_state 4. echo 0 > /sys/class/thermal/cooling_device21/cur_state I use turbostat to monitor the CPU Busy% in all 4 steps. If 'cpumask' does not include all the Ecore CPUs, all CPUs becomes 100% busy after idle injection removed in step 4. If 'cpumask' includes all the Ecore CPUs, i.e. cpumask = FFxy, in some cases, the Ecore CPUs will drop to an Busy% much lower than 10%, and then they don't come back to busy after idle injection removed in step 4, although we have 16 stress threads. And this also relates with how long we stay in idle injection. Say, when cpumask=fff3, the problem can be triggered occasionally if there is a 10 second timeout between step 3 and step4, but it is much easier to reproducible if I increase the timeout to 20 seconds. It seems that Pcore can always pull tasks from Ecores, but Ecore can not pull tasks from Pcore HT siblings. thanks, rui On Sat, 2023-02-04 at 18:59 -0800, Srinivas Pandruvada wrote: > Split from the series for powerclamp user of powercap idle-inject. > > v2 > - Build warnings reported by Rui > - Moved the powerclamp documentation to admin guide folder > - Commit log updated as suggested by Rafael and other code suggestion > > Srinivas Pandruvada (2): > Documentation:admin-guide: Move intel_powerclamp documentation > thermal/drivers/intel_powerclamp: Add two module parameters > > Documentation/admin-guide/index.rst | 1 + > .../thermal/intel_powerclamp.rst | 22 +++ > Documentation/driver-api/thermal/index.rst | 1 - > MAINTAINERS | 1 + > drivers/thermal/intel/intel_powerclamp.c | 177 +++++++++++++++- > -- > 5 files changed, 180 insertions(+), 22 deletions(-) > rename Documentation/{driver-api => admin- > guide}/thermal/intel_powerclamp.rst (93%) >
Hi Rui, On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > Hi, Srinivas, > > First of all, the previous build error is gone. > > Second, I found something strange, which may be related with the > scheduler asym-packing, so CC Ricardo. > I thought you disable ITMT before idle injection and reenebale after removal. > The test is done with pm linux-intel branch + this patch series on an > ADL system. Can you do test on bleeding edge branch of Linux-pm? > cpu0~cpu7 are Pcore cpus, cpu8-cpu15 are Ecore cpus, and > intel_powerclamp is register as cooling_device21. > > 1. run stress -c 16 > 2. update /sys/module/intel_powerclamp/parameters/cpumask > echo 90 > /sys/module/intel_powerclamp/parameters/max_idle > 3. echo 90 > /sys/class/thermal/cooling_device21/cur_state > 4. echo 0 > /sys/class/thermal/cooling_device21/cur_state > I use turbostat to monitor the CPU Busy% in all 4 steps. > > If 'cpumask' does not include all the Ecore CPUs, all CPUs becomes > 100% > busy after idle injection removed in step 4. > that should be the case. > If 'cpumask' includes all the Ecore CPUs, i.e. cpumask = FFxy, in > some > cases, the Ecore CPUs will drop to an Busy% much lower than 10%, and > then they don't come back to busy after idle injection removed in > step Do you see that idle injection is removed message in dmesg? We can also check powercap idle-inejct, if some CPUs still not wake from play_idle. > 4, although we have 16 stress threads. And this also relates with how > long we stay in idle injection. > > Say, when cpumask=fff3, the problem can be triggered occasionally if > there is a 10 second timeout between step 3 and step4, but it is much > easier to reproducible if I increase the timeout to 20 seconds. > > It seems that Pcore can always pull tasks from Ecores, but Ecore can > not pull tasks from Pcore HT siblings. > That will be regular load balance threads should do. Better to try upsteam kernel first. Thanks, Srinivas > thanks, > rui > > On Sat, 2023-02-04 at 18:59 -0800, Srinivas Pandruvada wrote: > > Split from the series for powerclamp user of powercap idle-inject. > > > > v2 > > - Build warnings reported by Rui > > - Moved the powerclamp documentation to admin guide folder > > - Commit log updated as suggested by Rafael and other code > > suggestion > > > > Srinivas Pandruvada (2): > > Documentation:admin-guide: Move intel_powerclamp documentation > > thermal/drivers/intel_powerclamp: Add two module parameters > > > > Documentation/admin-guide/index.rst | 1 + > > .../thermal/intel_powerclamp.rst | 22 +++ > > Documentation/driver-api/thermal/index.rst | 1 - > > MAINTAINERS | 1 + > > drivers/thermal/intel/intel_powerclamp.c | 177 > > +++++++++++++++- > > -- > > 5 files changed, 180 insertions(+), 22 deletions(-) > > rename Documentation/{driver-api => admin- > > guide}/thermal/intel_powerclamp.rst (93%) > >
On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote: > Hi Rui, > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > > Hi, Srinivas, > > > > First of all, the previous build error is gone. > > > > Second, I found something strange, which may be related with the > > scheduler asym-packing, so CC Ricardo. > > > I thought you disable ITMT before idle injection and reenebale after > removal. No. I can reproduce this by playing with raw intel_powerclamp sysfs knobs and ITMT enabled. > > > > > The test is done with pm linux-intel branch sorry, I mean linux-next branch. > > + this patch series on an > > ADL system. > Can you do test on bleeding edge branch of Linux-pm? > > > cpu0~cpu7 are Pcore cpus, cpu8-cpu15 are Ecore cpus, and > > intel_powerclamp is register as cooling_device21. > > > > 1. run stress -c 16 > > 2. update /sys/module/intel_powerclamp/parameters/cpumask > > echo 90 > /sys/module/intel_powerclamp/parameters/max_idle > > 3. echo 90 > /sys/class/thermal/cooling_device21/cur_state > > 4. echo 0 > /sys/class/thermal/cooling_device21/cur_state > > I use turbostat to monitor the CPU Busy% in all 4 steps. > > > > If 'cpumask' does not include all the Ecore CPUs, all CPUs becomes > > 100% > > busy after idle injection removed in step 4. > > > that should be the case. > > > If 'cpumask' includes all the Ecore CPUs, i.e. cpumask = FFxy, in > > some > > cases, the Ecore CPUs will drop to an Busy% much lower than 10%, > > and > > then they don't come back to busy after idle injection removed in > > step > Do you see that idle injection is removed message in dmesg? yes. > We can also check powercap idle-inejct, if some CPUs still not wake > from play_idle. "ps" command shows the the idle_injection threads time is not increasing any more. > > > > 4, although we have 16 stress threads. And this also relates with > > how > > long we stay in idle injection. > > > > Say, when cpumask=fff3, the problem can be triggered occasionally > > if > > there is a 10 second timeout between step 3 and step4, but it is > > much > > easier to reproducible if I increase the timeout to 20 seconds. > > > > It seems that Pcore can always pull tasks from Ecores, but Ecore > > can > > not pull tasks from Pcore HT siblings. > > > That will be regular load balance threads should do. > Better to try upsteam kernel first. I'm already running with linux-pm tree linux-next branch + this patch series. thanks, rui > > Thanks, > Srinivas > > > > thanks, > > rui > > > > On Sat, 2023-02-04 at 18:59 -0800, Srinivas Pandruvada wrote: > > > Split from the series for powerclamp user of powercap idle- > > > inject. > > > > > > v2 > > > - Build warnings reported by Rui > > > - Moved the powerclamp documentation to admin guide folder > > > - Commit log updated as suggested by Rafael and other code > > > suggestion > > > > > > Srinivas Pandruvada (2): > > > Documentation:admin-guide: Move intel_powerclamp documentation > > > thermal/drivers/intel_powerclamp: Add two module parameters > > > > > > Documentation/admin-guide/index.rst | 1 + > > > .../thermal/intel_powerclamp.rst | 22 +++ > > > Documentation/driver-api/thermal/index.rst | 1 - > > > MAINTAINERS | 1 + > > > drivers/thermal/intel/intel_powerclamp.c | 177 > > > +++++++++++++++- > > > -- > > > 5 files changed, 180 insertions(+), 22 deletions(-) > > > rename Documentation/{driver-api => admin- > > > guide}/thermal/intel_powerclamp.rst (93%) > > >
On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote: > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote: > > Hi Rui, > > > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > > > Hi, Srinivas, > > > > > > First of all, the previous build error is gone. > > > > > > Second, I found something strange, which may be related with the > > > scheduler asym-packing, so CC Ricardo. > > > > > I thought you disable ITMT before idle injection and reenebale > > after > > removal. > > No. > > I can reproduce this by playing with raw intel_powerclamp sysfs knobs > and ITMT enabled. > This issue is happening even if ITMT disabled. If the module mask is composed of P-cores it works or even on servers as expected. Also if you offline all P-cores then select mask among E-cores, it is working. Somehow P-core influences E-cores. Since this patch is module mask related, that is functioning correctly. We have to debug this interaction with P and E cores separately. Thanks, Srinivas > > > > > > > > > The test is done with pm linux-intel branch > > sorry, I mean linux-next branch. > > > > + this patch series on an > > > ADL system. > > Can you do test on bleeding edge branch of Linux-pm? > > > > > cpu0~cpu7 are Pcore cpus, cpu8-cpu15 are Ecore cpus, and > > > intel_powerclamp is register as cooling_device21. > > > > > > 1. run stress -c 16 > > > 2. update /sys/module/intel_powerclamp/parameters/cpumask > > > echo 90 > /sys/module/intel_powerclamp/parameters/max_idle > > > 3. echo 90 > /sys/class/thermal/cooling_device21/cur_state > > > 4. echo 0 > /sys/class/thermal/cooling_device21/cur_state > > > I use turbostat to monitor the CPU Busy% in all 4 steps. > > > > > > If 'cpumask' does not include all the Ecore CPUs, all CPUs > > > becomes > > > 100% > > > busy after idle injection removed in step 4. > > > > > that should be the case. > > > > > If 'cpumask' includes all the Ecore CPUs, i.e. cpumask = FFxy, in > > > some > > > cases, the Ecore CPUs will drop to an Busy% much lower than 10%, > > > and > > > then they don't come back to busy after idle injection removed in > > > step > > Do you see that idle injection is removed message in dmesg? > > yes. > > > We can also check powercap idle-inejct, if some CPUs still not wake > > from play_idle. > > "ps" command shows the the idle_injection threads time is not > increasing any more. > > > > > > > > 4, although we have 16 stress threads. And this also relates with > > > how > > > long we stay in idle injection. > > > > > > Say, when cpumask=fff3, the problem can be triggered occasionally > > > if > > > there is a 10 second timeout between step 3 and step4, but it is > > > much > > > easier to reproducible if I increase the timeout to 20 seconds. > > > > > > It seems that Pcore can always pull tasks from Ecores, but Ecore > > > can > > > not pull tasks from Pcore HT siblings. > > > > > That will be regular load balance threads should do. > > Better to try upsteam kernel first. > > I'm already running with linux-pm tree linux-next branch + this patch > series. > > thanks, > rui > > > > > Thanks, > > Srinivas > > > > > > > thanks, > > > rui > > > > > > On Sat, 2023-02-04 at 18:59 -0800, Srinivas Pandruvada wrote: > > > > Split from the series for powerclamp user of powercap idle- > > > > inject. > > > > > > > > v2 > > > > - Build warnings reported by Rui > > > > - Moved the powerclamp documentation to admin guide folder > > > > - Commit log updated as suggested by Rafael and other code > > > > suggestion > > > > > > > > Srinivas Pandruvada (2): > > > > Documentation:admin-guide: Move intel_powerclamp > > > > documentation > > > > thermal/drivers/intel_powerclamp: Add two module parameters > > > > > > > > Documentation/admin-guide/index.rst | 1 + > > > > .../thermal/intel_powerclamp.rst | 22 +++ > > > > Documentation/driver-api/thermal/index.rst | 1 - > > > > MAINTAINERS | 1 + > > > > drivers/thermal/intel/intel_powerclamp.c | 177 > > > > +++++++++++++++- > > > > -- > > > > 5 files changed, 180 insertions(+), 22 deletions(-) > > > > rename Documentation/{driver-api => admin- > > > > guide}/thermal/intel_powerclamp.rst (93%) > > > >
On Mon, Feb 06, 2023 at 02:02:28AM -0800, srinivas pandruvada wrote: > On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote: > > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote: > > > Hi Rui, > > > > > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > > > > Hi, Srinivas, > > > > > > > > First of all, the previous build error is gone. > > > > > > > > Second, I found something strange, which may be related with the > > > > scheduler asym-packing, so CC Ricardo. > > > > > > > I thought you disable ITMT before idle injection and reenebale > > > after > > > removal. > > > > No. > > > > I can reproduce this by playing with raw intel_powerclamp sysfs knobs > > and ITMT enabled. > > > > This issue is happening even if ITMT disabled. If the module mask is > composed of P-cores it works or even on servers as expected. > Also if you offline all P-cores then select mask among E-cores, it is > working. Somehow P-core influences E-cores. > > Since this patch is module mask related, that is functioning correctly. > We have to debug this interaction with P and E cores separately. Currently, when doing asym_packing, ECores will only pull tasks from a PCore only if both SMT siblings are busy. It will only pull from the lower-priority sibling. These patches [1] let ECores pull from either sibling, if both are busy. I presume that by injecting idle, the scheduler thinks that the CPU is idle (i.e., idle_cpu() returns true) and it will not do asym_packing from lower-priority CPUs. However, in your experiment you have 16 threads. If a Pcore is overloaded, an ECore should be able to help. [1]. https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com/
On Tue, 2023-02-07 at 05:42 -0800, Ricardo Neri wrote: > On Mon, Feb 06, 2023 at 02:02:28AM -0800, srinivas pandruvada wrote: > > On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote: > > > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote: > > > > Hi Rui, > > > > > > > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > > > > > Hi, Srinivas, > > > > > > > > > > First of all, the previous build error is gone. > > > > > > > > > > Second, I found something strange, which may be related with > > > > > the > > > > > scheduler asym-packing, so CC Ricardo. > > > > > > > > > I thought you disable ITMT before idle injection and reenebale > > > > after > > > > removal. > > > > > > No. > > > > > > I can reproduce this by playing with raw intel_powerclamp sysfs > > > knobs > > > and ITMT enabled. > > > > > > > This issue is happening even if ITMT disabled. If the module mask > > is > > composed of P-cores it works or even on servers as expected. > > Also if you offline all P-cores then select mask among E-cores, it > > is > > working. Somehow P-core influences E-cores. > > > > Since this patch is module mask related, that is functioning > > correctly. > > We have to debug this interaction with P and E cores separately. > > Currently, when doing asym_packing, ECores will only pull tasks from > a > PCore only if both SMT siblings are busy. It will only pull from the > lower-priority sibling. These patches [1] let ECores pull from either > sibling, if both are busy. > > I presume that by injecting idle, the scheduler thinks that the CPU > is > idle (i.e., idle_cpu() returns true) and it will not do asym_packing > from > lower-priority CPUs. > > However, in your experiment you have 16 threads. If a Pcore is > overloaded, > an ECore should be able to help. This issue happens with or without ITMT and also without any idle injection active. Thanks, Srinivas > > [1]. > https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com/ >
On Tue, Feb 07, 2023 at 05:51:59AM -0800, srinivas pandruvada wrote: > On Tue, 2023-02-07 at 05:42 -0800, Ricardo Neri wrote: > > On Mon, Feb 06, 2023 at 02:02:28AM -0800, srinivas pandruvada wrote: > > > On Mon, 2023-02-06 at 08:05 +0000, Zhang, Rui wrote: > > > > On Sun, 2023-02-05 at 18:45 -0800, srinivas pandruvada wrote: > > > > > Hi Rui, > > > > > > > > > > On Sun, 2023-02-05 at 15:57 +0000, Zhang, Rui wrote: > > > > > > Hi, Srinivas, > > > > > > > > > > > > First of all, the previous build error is gone. > > > > > > > > > > > > Second, I found something strange, which may be related with > > > > > > the > > > > > > scheduler asym-packing, so CC Ricardo. > > > > > > > > > > > I thought you disable ITMT before idle injection and reenebale > > > > > after > > > > > removal. > > > > > > > > No. > > > > > > > > I can reproduce this by playing with raw intel_powerclamp sysfs > > > > knobs > > > > and ITMT enabled. > > > > > > > > > > This issue is happening even if ITMT disabled. If the module mask > > > is > > > composed of P-cores it works or even on servers as expected. > > > Also if you offline all P-cores then select mask among E-cores, it > > > is > > > working. Somehow P-core influences E-cores. > > > > > > Since this patch is module mask related, that is functioning > > > correctly. > > > We have to debug this interaction with P and E cores separately. > > > > Currently, when doing asym_packing, ECores will only pull tasks from > > a > > PCore only if both SMT siblings are busy. It will only pull from the > > lower-priority sibling. These patches [1] let ECores pull from either > > sibling, if both are busy. > > > > I presume that by injecting idle, the scheduler thinks that the CPU > > is > > idle (i.e., idle_cpu() returns true) and it will not do asym_packing > > from > > lower-priority CPUs. > > > > However, in your experiment you have 16 threads. If a Pcore is > > overloaded, > > an ECore should be able to help. > This issue happens with or without ITMT and also without any idle > injection active. I was not able to reproduce this issue on my ADL-S system with ITMT. The described bug is exactly what and old patchset of mine was supposed to fix [2]. Maybe the CPU priorities in the failing system are such that it prevents asym_packing from kicking in. I was able to reproduce the issue without ITMT. I had found that the scheduler cannot handle load balance between SMT and non-SMT cores correctly. My patchset [1] includes fixes for this case. I applied it on top of Rafael's linux-next branch and it fixed the issue for me in the non-ITMT case. Perhaps patches 5 and 6 are sufficient, but I applied the whole series. Thanks and BR, Ricardo [1]. https://lore.kernel.org/lkml/20230207045838.11243-1-ricardo.neri-calderon@linux.intel.com/ [2]. https://lore.kernel.org/all/20210911011819.12184-7-ricardo.neri-calderon@linux.intel.com/