public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
To: Peter Jung <ptr1337@cachyos.org>,
	peterz@infradead.org, mingo@redhat.com, rui.zhang@intel.com,
	irogers@google.com, kan.liang@linux.intel.com,
	tglx@linutronix.de, bp@alien8.dei, gautham.shenoy@amd.com
Cc: kprateek.nayak@amd.com, ravi.bangoria@amd.com, x86@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 10/10] perf/x86/rapl: Add core energy counter support for AMD CPUs
Date: Thu, 21 Nov 2024 21:28:29 +0530	[thread overview]
Message-ID: <76af0bc2-fecf-4f5b-8c52-924f49ac9b7a@amd.com> (raw)
In-Reply-To: <f90ee4f3-704d-4776-99e7-04f30969d93e@cachyos.org>



On 11/20/2024 8:00 PM, Peter Jung wrote:
> Hi Dhananjay,
> 
> On 20.11.24 14:58, Dhananjay Ugwekar wrote:
>> Hello Peter Jung,
>>
>> Thanks for trying out the patchset,
>>
>> On 11/20/2024 1:28 PM, Peter Jung wrote:
>>> Hi together,
>>>
>>> This patch seems to crash the kernel  and results into a not bootable system.
>>>
>>>
>>> The patch has been applied on base 6.12.rc7 - I have not tested it yet on linux-next.
>>>
>>> I was able to reproduce this issue also on the v6 and the only "good" version was the v4.
>>> This has been reproduced on several zen3+ machines and also on my 9950X.
>>>
>>> Bisect log:
>>> ```
>>> git bisect start
>>> # status: waiting for both good and bad commits
>>> # good: [2d5404caa8c7bb5c4e0435f94b28834ae5456623] Linux 6.12-rc7
>>> git bisect good 2d5404caa8c7bb5c4e0435f94b28834ae5456623
>>> # status: waiting for bad commit, 1 good commit known
>>> # bad: [372e95a40e04ae6ebe69300b76566af6455ba84e] perf/x86/rapl: Add core energy counter support for AMD CPUs
>>> git bisect bad 372e95a40e04ae6ebe69300b76566af6455ba84e
>>> # good: [fd3c84b2fc8a50030e8c7d91983f50539035ec3a] perf/x86/rapl: Rename rapl_pmu variables
>>> git bisect good fd3c84b2fc8a50030e8c7d91983f50539035ec3a
>>> # good: [96673b2c940e71fde50a54311ecdce00ff7a8e0b] perf/x86/rapl: Modify the generic variable names to *_pkg*
>>> git bisect good 96673b2c940e71fde50a54311ecdce00ff7a8e0b
>>> # good: [68b214c92635f0b24a3f3074873b77f4f1a82b80] perf/x86/rapl: Move the cntr_mask to rapl_pmus struct
>>> git bisect good 68b214c92635f0b24a3f3074873b77f4f1a82b80
>>> # first bad commit: [372e95a40e04ae6ebe69300b76566af6455ba84e] perf/x86/rapl: Add core energy counter support for AMD CPUs
>>> ```
>>>
>>> Nov 17 12:17:37 varvalian kernel: RIP: 0010:internal_create_group+0x9a/0x4e0
>>> Nov 17 12:17:37 varvalian kernel: Code: 7b 20 00 0f 84 cb 00 00 00 48 8d 74 24 1c 48 8d 54 24 18 4c 89 ff e8 15 8a 99 00 48 83 3b 00 74 59 48 8b 43 18 48 85 c0 74 11 <48> 8b 30 48 85 f6 74 09 4c 8b 5b 08 4d 85 db 75 1a 48 8b 43 20 48
>>> Nov 17 12:17:37 varvalian kernel: RSP: 0018:ffffaa5281fe7868 EFLAGS: 00010202
>>> Nov 17 12:17:37 varvalian kernel: RAX: 796772656e650073 RBX: ffffffffc2a642aa RCX: f781ec27a963db00
>>> Nov 17 12:17:37 varvalian kernel: RDX: ffffaa5281fe7880 RSI: ffffaa5281fe7884 RDI: ffff90c611dc8400
>>> Nov 17 12:17:37 varvalian kernel: RBP: 000000000000000f R08: 0000000000000000 R09: 0000000000000001
>>> Nov 17 12:17:37 varvalian kernel: R10: 0000000002000001 R11: ffffffff8e86ee00 R12: 0000000000000000
>>> Nov 17 12:17:37 varvalian kernel: R13: ffff90c6038469c0 R14: ffff90c611dc8400 R15: ffff90c611dc8400
>>> Nov 17 12:17:37 varvalian kernel: FS:  00007163efc54880(0000) GS:ffff90c8efe00000(0000) knlGS:0000000000000000
>>> Nov 17 12:17:37 varvalian kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> Nov 17 12:17:37 varvalian kernel: CR2: 00005c1834b98298 CR3: 0000000121298000 CR4: 0000000000f50ef0
>>> Nov 17 12:17:37 varvalian kernel: PKRU: 55555554
>>> Nov 17 12:17:47 varvalian kernel: ------------[ cut here ]------------
>>> ```
>>>
>>> Ill do on the weekend some additonal tests based on the latest linux-next snapshot and provide some more logs.
>> Can you please try with the below diff once,
>>
>> diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
>> index e9be1f31163d..d3bb3865c1b1 100644
>> --- a/arch/x86/events/rapl.c
>> +++ b/arch/x86/events/rapl.c
>> @@ -699,6 +699,7 @@ static const struct attribute_group *rapl_attr_update[] = {
>>
>>   static const struct attribute_group *rapl_core_attr_update[] = {
>>          &rapl_events_core_group,
>> +       NULL,
>>   };
>>
>>   static int __init init_rapl_pmu(struct rapl_pmus *rapl_pmus)
>>
>> Regards,
>> Dhananjay
>>
> 
> 
> Thanks! This patch appears to fix the issue, when the kernel is built with clang. Thanks for providing such fast fix! :)

Great!, Thanks for the confirmation.

Regards,
Dhananjay

> 
> Peter
> 
> 
>>> Regards,
>>>
>>> Peter
> 

  reply	other threads:[~2024-11-21 15:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15  6:07 [PATCH v7 00/10] Add RAPL core energy counter support for AMD CPUs Dhananjay Ugwekar
2024-11-15  6:07 ` [PATCH v7 01/10] perf/x86/rapl: Remove the unused get_rapl_pmu_cpumask() function Dhananjay Ugwekar
2024-11-15  6:07 ` [PATCH v7 02/10] x86/topology: Introduce topology_logical_core_id() Dhananjay Ugwekar
2024-11-15  6:07 ` [PATCH v7 03/10] perf/x86/rapl: Remove the cpu_to_rapl_pmu() function Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 04/10] perf/x86/rapl: Rename rapl_pmu variables Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 05/10] perf/x86/rapl: Make rapl_model struct global Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 06/10] perf/x86/rapl: Add arguments to the init and cleanup functions Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 07/10] perf/x86/rapl: Modify the generic variable names to *_pkg* Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 08/10] perf/x86/rapl: Remove the global variable rapl_msrs Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 09/10] perf/x86/rapl: Move the cntr_mask to rapl_pmus struct Dhananjay Ugwekar
2024-11-15  6:08 ` [PATCH v7 10/10] perf/x86/rapl: Add core energy counter support for AMD CPUs Dhananjay Ugwekar
2024-11-20  7:58   ` Peter Jung
2024-11-20  8:18     ` Peter Jung
2024-11-20 13:58     ` Dhananjay Ugwekar
2024-11-20 14:30       ` Peter Jung
2024-11-21 15:58         ` Dhananjay Ugwekar [this message]
2025-01-12 13:42   ` Koichiro Den
2025-01-13  6:34     ` Dhananjay Ugwekar
2025-01-15 14:23       ` Koichiro Den
2025-01-20 11:42         ` Dhananjay Ugwekar
2025-01-28  8:11           ` Dhananjay Ugwekar
2025-01-29  3:03             ` Koichiro Den
2025-01-29  5:34               ` Dhananjay Ugwekar
2024-11-19 12:20 ` [PATCH v7 00/10] Add RAPL " Peter Zijlstra
2024-11-22  6:34   ` Dhananjay Ugwekar
2024-11-22 11:19     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76af0bc2-fecf-4f5b-8c52-924f49ac9b7a@amd.com \
    --to=dhananjay.ugwekar@amd.com \
    --cc=bp@alien8.dei \
    --cc=gautham.shenoy@amd.com \
    --cc=irogers@google.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ptr1337@cachyos.org \
    --cc=ravi.bangoria@amd.com \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox