Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1568896rdb; Wed, 20 Sep 2023 12:54:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSomSK4VBzxA0ugZhGSwLOtbIjy42HFvS6g/56YcRNF/4dykJbvY+E3Cl2c26o13JA9FSi X-Received: by 2002:a05:6830:c8c:b0:6c4:897a:31d2 with SMTP id bn12-20020a0568300c8c00b006c4897a31d2mr262615otb.30.1695239680607; Wed, 20 Sep 2023 12:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695239680; cv=none; d=google.com; s=arc-20160816; b=u8rndgp0cPye5T5bwG1kV+7uFh1eMjji2Trk7x9/5RXr+2cY4ztvNb6Z0dG1fHurwW oZTQgnpcF+KLUo0BIU1zV2T1MItcbH73MHkgBOjrup5tkxWlSQo7K/0WJF1Ff5yueWF/ w245KAgnXh+EmTvME6M565VPv4YluXXmsiICWIfJ1uRnTVoBqStnQuDGkJ4V57jkApJH 5s+uSjXNetXRQ5m4a8vdirfazoEKgRguU90KxW93qTg5hhypJyv05G5nZekS9FadX+qp 3VIzfyA3V6NzPg9s44w9iN01hQTck5tcAIJI9I/otBZZdPbOwiZlnrqXMaZmTFhU4zIu VU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ieFwOXSMXwW5Z1TbA7klO5guFnw5DamdxsZ5CsxGlt0=; fh=EXxNFT6l7A3pgtu1aNl6KzTzCgax1KHYRoev8XUsdHc=; b=CnLErLKg5Yhcrj/MLZqNXhgOE2u+2e06ydcDuAO2Ipefpkz1ILe93TNj7c59XeGKP5 eYGw8mLxxmA/0XW30D9IIxImkwzYVQ7vJPJPa6/9t2WTR73Ktqebz0lJav8bmvKdqUNI y3x9Mp2xuaGTTrRYIUo8obiLY1tEB92JHZwKuzM3BjIA5mjXR5QvQClcovGYcvUCswDV bjpZj716oqDTNEG3DpJKD1FNzFtgwhQlckSstCQWRZ0u44s9dCFDi/QdctGJNtXMXRaO b1l4cnUb4V7eNyrvVi1AByLidlIQ7YyZ/KxB4IyqO0mxwEPPOCgYCSIkb4QuVvdYcDzM 2Vew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=Wpkll7Je; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h71-20020a636c4a000000b005780f049ffesi10620976pgc.347.2023.09.20.12.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@natalenko.name header.s=dkim-20170712 header.b=Wpkll7Je; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=natalenko.name Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C0C5F8294B51; Wed, 20 Sep 2023 12:34:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjITTet (ORCPT + 99 others); Wed, 20 Sep 2023 15:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjITTej (ORCPT ); Wed, 20 Sep 2023 15:34:39 -0400 Received: from vulcan.natalenko.name (vulcan.natalenko.name [104.207.131.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D3B9F; Wed, 20 Sep 2023 12:34:31 -0700 (PDT) Received: from spock.localnet (unknown [94.142.239.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 74E58150A22B; Wed, 20 Sep 2023 21:34:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1695238468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ieFwOXSMXwW5Z1TbA7klO5guFnw5DamdxsZ5CsxGlt0=; b=Wpkll7Je8Gck2iZpd4BOW50eRsftKl4A3iDUArvIOYyke7t3nm5Fli7jg4q5J3dJGqEEVy kEYUkhw7PIY+Cd/WggeAxoELj3T7EBZ741uOX07yatvrGaYUBgLLLU9TUsowp1OuVGQMWj n+h5ufMLaU9YYHTGfcKYISaR6KJC4oc= From: Oleksandr Natalenko To: Huang Rui , Meng Li , Mario Limonciello Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, Nathan Fontenot , Deepak Sharma , Alex Deucher , Shimmer Huang , Perry Yuan , Xiaojian Du , Viresh Kumar , Borislav Petkov , "Rafael J . Wysocki" Subject: Re: [PATCH V7 0/7] amd-pstate preferred core Date: Wed, 20 Sep 2023 21:34:17 +0200 Message-ID: <12290212.O9o76ZdvQC@natalenko.name> In-Reply-To: References: <20230918081407.756858-1-li.meng@amd.com> <5973628.lOV4Wx5bFT@natalenko.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5713749.DvuYhMxLoT"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 12:34:49 -0700 (PDT) --nextPart5713749.DvuYhMxLoT Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Oleksandr Natalenko Subject: Re: [PATCH V7 0/7] amd-pstate preferred core Date: Wed, 20 Sep 2023 21:34:17 +0200 Message-ID: <12290212.O9o76ZdvQC@natalenko.name> In-Reply-To: MIME-Version: 1.0 Hello. On st=C5=99eda 20. z=C3=A1=C5=99=C3=AD 2023 18:56:09 CEST Mario Limonciello= wrote: > > When applied on top of v6.5.3 this breaks turbo on my 5950X after suspe= nd/resume cycle. Please see the scenario description below. > >=20 > > If I boot v6.5.3 + this patchset, then `turbostat` reports ~4.9 GHz on = core 0 where `taskset -c 0 dd if=3D/dev/zero of=3D/dev/null` is being run. > >=20 > > After I suspend the machine and then resume it, and run `dd` again, `tu= rbostat` reports the core to be capped to a stock frequency of ~3.4 GHz. Re= booting the machine fixes this, and the CPU can boost again. > >=20 > > If this patchset is reverted, then the CPU can turbo after suspend/resu= me cycle just fine. > >=20 > > I'm using `amd_pstate=3Dguided`. > >=20 > > Is this behaviour expected? >=20 > To help confirm where the issue is, can I ask you to do three=20 > experiments with the patch series applied: >=20 > 1) 'amd_pstate=3Dactive' on your kernel command line. The issue is reproducible. If I toggle the governor in cpupower to `powersa= ve` and back to `performance`, boost is restored. > 2) 'amd_pstate=3Dactive amd_prefcore=3Ddisable' on your kernel command li= ne. The issue is not reproducible. > 3) 'amd_pstate=3Dguided amd_prefcore=3Ddisable' on your kernel command li= ne. The issue is not reproducible. I should also mention that in my initial configuration I use `amd_pstate=3D= guided` and `schedutil`. If I switch to `performance` after suspend-resume = cycle, the boost is restored. However, if I switch back to `schedutil`, the= freq is capped. Does this info help? > Looking through the code, I anticipate from your report that it=20 > reproduces on "1" but not "2" and "3". >=20 > Meng, >=20 > Can you try to repro? >=20 > I think that it's probably a call to amd_pstate_init_prefcore() missing > from amd_pstate_cpu_resume() and also amd_pstate_epp_resume(). =2D-=20 Oleksandr Natalenko (post-factum) --nextPart5713749.DvuYhMxLoT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZUOOw5ESFLHZZtOKil/iNcg8M0sFAmULSTkACgkQil/iNcg8 M0sqsA//eFdiuY7Cxaer5l0lBux1QhGyN0q30uy+zbybTXSfN4BGYulhA/nihp5k TRvwAYlSQf1Zhoi40S2xQlpblgLkiSl+a9UtdVju7RKfButrbNhFmQSygIHYQnmc kKYu+2079+3GvpFYPxtMJBR5UNbbNZ+dFTmj8SYnQ7Zm0cizbzi+WtIphnNuhubE fLs8Dc1XtvrqukGjffefSDjzQ7pd/LIcD1zG4nPbdyUIki52P/Y4TewqqJ8ZePg5 qw/a/pRHePddz4rnEjCuSswZ98PXfipz7C1R49b1I6E7UlFAPqWnMQbioKYPUsWW Eszd8omTV4ejEwZ6kX22zynoCHNRg8O37SMBHxhNbIzIOVXTyGtD+9c4wd6AjAvy /+VRk9JJGHoZfh9YOB8tHNvmxzKUEQSW93KKlD8Var5hsqzWHsUxkCn3U74hB7Px dWmKRtau/qrarrS068QtM8QOIgfegUzvu0s6DyVFleI9Sx0zjfV1cfzgv02OYY75 9Zk+/qfNe6opvZMtGLTMUueQGMy1KGYhN55PPMxy5S1LeZPgfXZDHWdBMqQYpz3X RyNLvfoUYHGSQJJBKvhuloW0sauhFtVnBG7CF3A8e6t3dvzqBrwem+vdFBZw4uwt xuw0b6tGpTkmeRCtz23xGHpH9qE6uIo4Bo2FxenUm3jZHnNbALY= =EcDU -----END PGP SIGNATURE----- --nextPart5713749.DvuYhMxLoT--