Revert "[Deepin-Kernel-SIG] [linux 6.6-y] [Deepin] Fix kabi for CWF PMU support"#1500
Closed
opsiff wants to merge 1 commit intolinux-6.6.yfrom
Closed
Revert "[Deepin-Kernel-SIG] [linux 6.6-y] [Deepin] Fix kabi for CWF PMU support"#1500opsiff wants to merge 1 commit intolinux-6.6.yfrom
opsiff wants to merge 1 commit intolinux-6.6.yfrom
Conversation
This reverts commit 527ec89.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis revert removes the Deepin-specific hw_perf_event_ext extension and associated allocations, restoring the use of fields directly in struct hw_perf_event and updating ACR/dynamic constraint handling in the Intel PMU code accordingly. Class diagram for reverted hw_perf_event_ext and updated perf_event/hw_perf_eventclassDiagram
class hw_perf_event {
+u64 config
+u64 config1
+u64 last_tag
+u64 dyn_constraint
+unsigned long config_base
+unsigned long event_base
+int event_base_rdpmc
+int idx
+int last_cpu
+int flags
}
class perf_event {
+hw_perf_event hw
+u32 orig_type
+void* pmu
+void* ctx
+void* ns
+u64 attr
+unsigned int state
+unsigned int pending_disable
+unsigned int pending_wakeup
+unsigned int pending_kill
+unsigned int pending_read
+unsigned int oncpu
+unsigned int attach_state
+unsigned int read_size
+unsigned int mmap_locked
+unsigned int rb_needed
+unsigned int rb_node
+unsigned int pending_sync
+unsigned int pending_idx
+unsigned int group_caps
+unsigned int group_flags
+unsigned int tp_list
+unsigned int addr_filters
+unsigned int mutex
+unsigned int refcount
+unsigned int kref
+unsigned int fasync
+unsigned int clock
+unsigned int parent
+unsigned int child_list
+unsigned int sibling_list
+unsigned int rb_entry
+unsigned int rcuwait
+unsigned int owner
+unsigned int destroy
+unsigned int id_header_size
+unsigned int id
+unsigned int hwc_idx
+unsigned int pmu_private
+unsigned int pmu_ctx
+unsigned int pmu_disable_count
+unsigned int event_caps
+unsigned int event_flags
+unsigned int mmap_mutex
+unsigned int mmap_page
+unsigned int total_time_enabled
+unsigned int total_time_running
+unsigned int child_total_time_enabled
+unsigned int child_total_time_running
+unsigned int overflow_handler
+unsigned int overflow_ctx
+unsigned int clock_data
+unsigned int shadow_ctx_time
+unsigned int pmu_data
+unsigned int pending_list
+unsigned int pending_list_entry
+unsigned int pending_add
+unsigned int pending_del
+unsigned int pending_disable_next
+unsigned int ctx_time
+unsigned int tstamp
+unsigned int tstamp_running
+unsigned int tstamp_stopped
+unsigned int group_leader
+unsigned int group_entry
+unsigned int group_list
+unsigned int group_tree
+unsigned int event_list
+unsigned int event_entry
+unsigned int swevent_hlist
+unsigned int tp_event
+unsigned int addr_filters_list
+unsigned int pinned_groups
+unsigned int flexible_groups
+unsigned int cgroup
+unsigned int cgroup_entry
+unsigned int ctx_entry
+unsigned int namespace
+unsigned int ns_capable
+unsigned int user
+unsigned int mmap_count
+unsigned int mmap_page_list
+unsigned int rb
+unsigned int rb_entry_list
+unsigned int cpu
+unsigned int on_list
+unsigned int migrate_disable
+unsigned int migrate_enable
+unsigned int fasync_list
+unsigned int pending_mmap
+unsigned int pending_close
+unsigned int pending_group
+unsigned int pending_parent
+unsigned int pending_child
+unsigned int pending_unthrottle
+unsigned int pending_throttle
+unsigned int pending_mmap_event
+unsigned int pending_task
+unsigned int pending_ctx
+unsigned int pending_list_node
+unsigned int pending_event
+unsigned int pending_state
+unsigned int pending_time
+unsigned int pending_cpu
+unsigned int pending_idx2
+unsigned int pending_flags
+unsigned int pending_config
+unsigned int pending_config1
+unsigned int pending_dyn_constraint
+unsigned int pending_last_tag
+unsigned int pending_hw
+unsigned int pending_hw_state
+unsigned int pending_hw_flags
+unsigned int pending_hw_config
+unsigned int pending_hw_config1
+unsigned int pending_hw_dyn_constraint
+unsigned int pending_hw_last_tag
+unsigned int pending_hw_idx
+unsigned int pending_hw_last_cpu
+unsigned int pending_hw_event_base
+unsigned int pending_hw_config_base
+unsigned int pending_hw_event_base_rdpmc
+unsigned int pending_hw_extra
+unsigned int pending_hw_branch_reg
+unsigned int pending_hw_cache_reg
+unsigned int pending_hw_extra_reg
+unsigned int pending_hw_bts
+unsigned int pending_hw_flags2
+unsigned int pending_hw_state2
+unsigned int pending_hw_config2
+unsigned int pending_hw_config3
+unsigned int pending_hw_aux
+unsigned int pending_hw_aux_page
+unsigned int pending_hw_aux_offset
+unsigned int pending_hw_aux_size
+unsigned int pending_hw_aux_head
+unsigned int pending_hw_aux_tail
+unsigned int pending_hw_aux_mode
+unsigned int pending_hw_aux_watermark
+unsigned int pending_hw_aux_flags
+unsigned int pending_hw_aux_dir
+unsigned int pending_hw_aux_mmap
+unsigned int pending_hw_aux_map
+unsigned int pending_hw_aux_user
+unsigned int pending_hw_aux_owner
+unsigned int pending_hw_aux_state
+unsigned int pending_hw_aux_mutex
+unsigned int pending_hw_aux_rb
+unsigned int pending_hw_aux_rb_entry
+unsigned int pending_hw_aux_list
+unsigned int pending_hw_aux_list_entry
+unsigned int pending_hw_aux_group
+unsigned int pending_hw_aux_group_entry
+unsigned int pending_hw_aux_shadow
+unsigned int pending_hw_aux_shadow_entry
+unsigned int pending_hw_aux_shadow_list
+unsigned int pending_hw_aux_shadow_list_entry
+unsigned int pending_hw_aux_shadow_group
+unsigned int pending_hw_aux_shadow_group_entry
+unsigned int pending_hw_aux_shadow_rb
+unsigned int pending_hw_aux_shadow_rb_entry
+unsigned int pending_hw_aux_shadow_rb_list
+unsigned int pending_hw_aux_shadow_rb_list_entry
+unsigned int pending_hw_aux_shadow_rb_group
+unsigned int pending_hw_aux_shadow_rb_group_entry
+unsigned int pending_hw_aux_shadow_rb_group_list
+unsigned int pending_hw_aux_shadow_rb_group_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree
+unsigned int pending_hw_aux_shadow_rb_group_tree_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_list_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_group
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_group_entry
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_group_list
+unsigned int pending_hw_aux_shadow_rb_group_tree_node_group_tree_node_group_list_entry
+DEEPIN_KABI_RESERVE_1
+DEEPIN_KABI_RESERVE_2
+DEEPIN_KABI_RESERVE_3
+DEEPIN_KABI_RESERVE_4
}
perf_event --> hw_perf_event : has
%% Removed structure in this revert
class hw_perf_event_ext {
+u64 config1
+u64 dyn_constraint
}
class perf_event_old {
+hw_perf_event hw
+hw_perf_event_ext* hw_ext
+u32 orig_type
+DEEPIN_KABI_USE_1
+DEEPIN_KABI_RESERVE_2
+DEEPIN_KABI_RESERVE_3
+DEEPIN_KABI_RESERVE_4
}
perf_event_old --> hw_perf_event : has
perf_event_old --> hw_perf_event_ext : had_pointer
%% Show that hw_perf_event_ext was removed and its fields moved into hw_perf_event
hw_perf_event_ext <.. hw_perf_event : fields_moved_from
perf_event_old <.. perf_event : replaced_by
Flow diagram for updated perf_event allocation and free pathflowchart TD
A[perf_event_init] --> B[Create kmem_cache perf_event_cache]
B --> C[perf_event_alloc]
subgraph Allocation_path
C --> D[Allocate perf_event from perf_event_cache]
D --> E[Initialize event.hw including dyn_constraint and config1]
E --> F[Return initialized perf_event]
end
F --> G[Event used by PMU code
intel_pmu_hw_config
intel_pmu_enable_acr
intel_get_event_constraints]
G --> H[free_event_rcu]
subgraph Free_path
H --> I[perf_event_free_filter]
I --> J[Free perf_event to perf_event_cache]
end
%% Removed Deepin specific cache and allocations
subgraph Removed_in_revert
K[perf_hw_event_cache creation] -.-> L[Allocation of hw_perf_event_ext]
L -.-> M[Free hw_perf_event_ext in free_event_rcu]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #1378
Summary by Sourcery
Revert the previous change that introduced an auxiliary hw_perf_event_ext structure for Intel PMU ACR handling and restore use of the existing hw_perf_event fields and allocations.
Bug Fixes:
Enhancements: