Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1902692pxb; Thu, 28 Oct 2021 12:14:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYv6i+Zx5uhr2ma+WNmlxaHo1yKu1uyN2JTGU0Gf4ZSfD0TaZVwMUI2TBCly2EytNURUAx X-Received: by 2002:a63:9207:: with SMTP id o7mr4544348pgd.236.1635448476060; Thu, 28 Oct 2021 12:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635448476; cv=none; d=google.com; s=arc-20160816; b=Ze5mjT83IXgQQ9ZweP3NmAiFr90Lh4pqbT9/1i30ZdvwbOMl/b7LXEvhoRSUpF0puA qWXXPUO7g7Fuk+YbuwbFTcsXY5aBvizAI+8o5pzyNBE1ZT/dfQY2k6+RhtTLq363dNrU 5/FykaQhszgOwUbVEuoNEJmzZMZJpNdSQwv2L/0zLbpR3BBSoGVRiwaSw6z1zKtPQbfh Q7H6hZ0AC4KEHZw0M/ATdSrk2RzvHiR/hIIF5tN9drw4Jjca6yOhRDP86ZRolTUA9s45 MwSDYFwu9d5SQBjoST8g8Fik89aX61qcAlbmhiIFXafznI+VtSL5F3HjopIDt4RJOypY IHKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:ironport-hdrordr; bh=GMdBkOGMZnCZ5GayNbpDDvU6+kgWmngB5Dm03VxQ+mM=; b=HimxF4ygNIbt5joc7eF7oczpjprzcltFMLrFV2/+VQCbDBSy1FkjEQsnpPxqYNiQLu gnbmNQJTMt4opQLr30Z2B5Q2AB/cA5Ku0yzBJFjaJTlh++lXBfBnkoKr+8lJ09beHs3P 4S1cYH3ckFncEM+RD/PtsWNe+Lm96PP+404vYThvmhexMXD20voDfyxKbvP6xAr/zwTt xJ6vFlP8Ux18Oe+h258xZZR4YlhN938aDD1JqBbQa5cg33lNOowgm717dVJ4zfWAa1CZ EVFlz4gmgz+nXkrXTqKuzhA7B4U/vZC4MQqGRJY/MOrmKB/fJXV3+dpm6VbiyE69isQh nHrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si10116201pjp.171.2021.10.28.12.14.23; Thu, 28 Oct 2021 12:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbhJ1TPm (ORCPT + 99 others); Thu, 28 Oct 2021 15:15:42 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:19001 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbhJ1TPl (ORCPT ); Thu, 28 Oct 2021 15:15:41 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AeULCI6ONYMYeusBcTgijsMiBIKoaSvp037BL?= =?us-ascii?q?7TEOdfUxSKfzqynAppgmPGDP+U8ssR0b9Oxoe5PwOk80jKQFm7X5ZI3SITUO21?= =?us-ascii?q?HYU72Kk7GN/9SIIUSXygc678ZdmsNFZ+EYY2IK8foTEGODYrAdKCvsytHKuQ+C?= =?us-ascii?q?pE0dLz2DistbjzuRcjzranGeszM2YqbQ9vCnl696T9rLQwVyUviG?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="397679282" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 21:13:12 +0200 Date: Thu, 28 Oct 2021 21:13:12 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: "Rafael J. Wysocki" cc: Julia Lawall , Doug Smythies , Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , Viresh Kumar , Linux PM list , Linux Kernel Mailing List Subject: Re: problem in changing from active to passive mode In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Oct 2021, Rafael J. Wysocki wrote: > On Thu, Oct 28, 2021 at 7:57 PM Rafael J. Wysocki wrote: > > > > On Thu, Oct 28, 2021 at 7:29 PM Rafael J. Wysocki wrote: > > > > > > On Thu, Oct 28, 2021 at 7:10 PM Julia Lawall wrote: > > > > > > > > > Now, for your graph 3, are you saying this pseudo > > > > > code of the process is repeatable?: > > > > > > > > > > Power up the system, booting kernel 5.9 > > > > > switch to passive/schedutil. > > > > > wait X minutes for system to settle > > > > > do benchmark, result ~13 seconds > > > > > re-boot to kernel 5.15-RC > > > > > switch to passive/schedutil. > > > > > wait X minutes for system to settle > > > > > do benchmark, result ~40 seconds > > > > > re-boot to kernel 5.9 > > > > > switch to passive/schedutil. > > > > > wait X minutes for system to settle > > > > > do benchmark, result ~28 seconds > > > > > > > > In the first boot of 5.9, the des (desired?) field of the HWP_REQUEST > > > > register is 0 and in the second boot (after booting 5.15 and entering > > > > passive mode) it is 10. I don't know though if this is a bug or a > > > > feature... > > > > > > It looks like a bug. > > > > > > I think that the desired value is not cleared on driver exit which > > > should happen. Let me see if I can do a quick patch for that. > > > > Please check the behavior with the attached patch applied. > > Well, actually, the previous one won't do anything, because the > desired perf field is already cleared in this function before writing > the MSR, so please try the one attached to this message instead. > Turbostat still shows 10: cpu0: MSR_HWP_CAPABILITIES: 0x070a1525 (high 37 guar 21 eff 10 low 7) cpu0: MSR_HWP_REQUEST: 0x000a2525 (min 37 max 37 des 10 epp 0x0 window 0x0 pkg 0x0) cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff00 (min 0 max 255 des 0 epp 0x80 window 0x0) cpu0: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min) cpu1: MSR_PM_ENABLE: 0x00000001 (HWP) cpu1: MSR_HWP_CAPABILITIES: 0x070a1525 (high 37 guar 21 eff 10 low 7) cpu1: MSR_HWP_REQUEST: 0x000a2525 (min 37 max 37 des 10 epp 0x0 window 0x0 pkg 0x0) cpu1: MSR_HWP_REQUEST_PKG: 0x8000ff00 (min 0 max 255 des 0 epp 0x80 window 0x0) cpu1: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min) cpu2: MSR_PM_ENABLE: 0x00000001 (HWP) cpu2: MSR_HWP_CAPABILITIES: 0x070a1525 (high 37 guar 21 eff 10 low 7) cpu2: MSR_HWP_REQUEST: 0x000a2525 (min 37 max 37 des 10 epp 0x0 window 0x0 pkg 0x0) cpu2: MSR_HWP_REQUEST_PKG: 0x8000ff00 (min 0 max 255 des 0 epp 0x80 window 0x0) cpu2: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min) cpu3: MSR_PM_ENABLE: 0x00000001 (HWP) cpu3: MSR_HWP_CAPABILITIES: 0x070a1525 (high 37 guar 21 eff 10 low 7) cpu3: MSR_HWP_REQUEST: 0x000a2525 (min 37 max 37 des 10 epp 0x0 window 0x0 pkg 0x0) cpu3: MSR_HWP_REQUEST_PKG: 0x8000ff00 (min 0 max 255 des 0 epp 0x80 window 0x0) cpu3: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min) julia