Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1910553pxb; Thu, 28 Oct 2021 12:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8WESRImQ2ulnbS44sWk2WzImPEpkoqujfXdAy8wG/U9CWnKAe4SlR8DHmegZam4e2ot/S X-Received: by 2002:a17:906:3a0e:: with SMTP id z14mr7935066eje.55.1635449012642; Thu, 28 Oct 2021 12:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635449012; cv=none; d=google.com; s=arc-20160816; b=kyCAqeJ9GiqejR84O07ipLYUJyfxUn0Mu88bQaISH7psXLEqTeX3ktqLpLDnFqEYUE 858YuMBKWqAGXM7OcaJdc2dFY0g1KSb+gCx7HDswhhIXoj7f6iN4KSwvTdSTdrsURvPy tR/P1qA3W63rTQoSnNbgCeR06ie8whcElV+RnB/uXSmwIsu+in23hm1Cxm6dREilHLSy v6SLfahF63X4kaVMkUZO/WwOoR6/GEfIG7RSQbemzZr6Lq39D8NjtEaqc3ksJAjj4tEW cpEqfl8CCpUC7RadfNCnT9uvlbWaICsj1MQJMkqapanud70JLrQYRyHRWgd2zOKDIRZK xBLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=P/5ARsGcpEMGbQCnBWecGh+4ZkeC9jJduupFR+ZDYPs=; b=yUDhOf0Ou6laJfqpCtdo4KP2ccAZ7lh4OHrRUyFdcxIAIS8SdtsqPQnKh6HLHQ9pMB OpB54pwbroJZIbk0SQSN0sWbmxcJ8jGuTGIafGkPrbl8KhOZ2BWvnNIBCoVKh3dMqliJ +8k0DBDwjhvhwYAz5gc3/WrNlNFTOlB16Gj0BOdFnIfIJ218w/kbwPI35Qzb0irapQGY WEWT4rkFuhtetB1/HPXNV0xtazv0AyitZ7OZM1L1YSlXU3GzPcSU2alAQyABaQdZm5TL lFgiQwlAizgC54esq31qWTpwGkbqIOE//20Al1uTjhjsUnxxGVvF2YOFbsPCFFuB3BS3 Z61A== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm5si4857917edb.380.2021.10.28.12.23.08; Thu, 28 Oct 2021 12:23:32 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231221AbhJ1TXl (ORCPT + 99 others); Thu, 28 Oct 2021 15:23:41 -0400 Received: from mail-ot1-f46.google.com ([209.85.210.46]:45709 "EHLO mail-ot1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbhJ1TXk (ORCPT ); Thu, 28 Oct 2021 15:23:40 -0400 Received: by mail-ot1-f46.google.com with SMTP id l16-20020a9d6a90000000b0054e7ab56f27so10025126otq.12; Thu, 28 Oct 2021 12:21:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P/5ARsGcpEMGbQCnBWecGh+4ZkeC9jJduupFR+ZDYPs=; b=ZUhlClo+XgAJl+ApeoJjy4CtokxMCR34WNW39gPq9cHCzERE2RPq/88v9WrMgzXE0O A4cxlMNoGQH+p759kRdBFWWu4hpbrdXivspewAmmsfbY180lAS17JplgSOxkc7PjVQdH INZRc0a7cY06yfwceBy42J1mb90aANXI1jC7UD2LtklG6DZ6obM7Kr+ACg+8VFws421x 9n4vOFZKGeDdy0VkKmqaLmNcR7ljWH21V+tB5tqCYdst1x5tkOGb8ARUKIACoYk1o126 xoGWfUu/GNOxqmwZU7u7fLVVQVhRpU42JPhyD5B8xt+2j4sAijPx1XKxkKgZxL6lkJTz JlMg== X-Gm-Message-State: AOAM531pv3U0c7UGeheyYdkPXeB/wqpP2sSrbMWcQQtiqM9dh12Mmc6D i8M+iQKReaYwI8B/8nIgsIRqNSXys09UuJj+skQ= X-Received: by 2002:a05:6830:90b:: with SMTP id v11mr5047717ott.254.1635448873270; Thu, 28 Oct 2021 12:21:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 28 Oct 2021 21:21:02 +0200 Message-ID: Subject: Re: problem in changing from active to passive mode To: Julia Lawall Cc: "Rafael J. Wysocki" , Doug Smythies , Srinivas Pandruvada , Len Brown , "Rafael J. Wysocki" , Viresh Kumar , Linux PM list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 28, 2021 at 9:13 PM Julia Lawall wrote: > > > > 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) Hmmm. Is this also the case if you go from "passive" to "active" on 5.15-rc w/ the patch applied?