lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ab67aa4d-bc58-4c80-a95b-6bf21fb5417f@linux.intel.com>
Date: Wed, 12 Jun 2024 15:25:00 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Tim Chen <tim.c.chen@...ux.intel.com>, peterz@...radead.org,
 mingo@...nel.org, linux-kernel@...r.kernel.org
Cc: acme@...nel.org, namhyung@...nel.org, irogers@...gle.com,
 eranian@...gle.com, ak@...ux.intel.com, yunying.sun@...el.com
Subject: Re: [PATCH 1/8] perf/x86/uncore: Save the unit control address of all
 units



On 2024-06-12 1:33 p.m., Tim Chen wrote:
> On Wed, 2024-06-12 at 10:49 -0400, Liang, Kan wrote:
>>
>>
>> The id and pmu_idx+die can all be used as a key to search the RB tree in
>> different places.
>>
>> The id is the physical ID of a unit. The search via id is invoked when
>> adding a new unit. Perf needs to make sure that the same PMU idx
>> (logical id) is assigned to the unit with the same physical ID. Because
>> the units with the same physical ID in different dies share the same PMU.
> 
> This info about having same physical ID implies the same PMU
> is worth mentioning in a comment and will be quite helpful in
> understanding the rb-tree organization.
>

Sure I will update the description to explain the choice. Thanks.

Thanks,
Kan

> Thanks.
> 
> Tim
>>
>> The pmu_idx+die key is used when setting the cpumask. Please see
>> intel_uncore_find_discovery_unit_id() in the patch 2. Perf wants to
>> understand on which dies the given PMU is available.
>>
>> Since different keys can be used to search the RB tree, I think one of
>> them has to traverse the whole tree. At the stage of adding a new unit,
>> the tree is not complete yet. It minimizes the impact of the O(N)
>> search. So I choose the pmu_idx+die rather than id.
>>
>> Also, the driver only does once to build the tree and set the cpumask at
>> driver load time. I think the O(N) should be acceptable here.
>>
>> Thanks,
>> Kan
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ