Re: [PATCH v7 5/5] perf: Correct perf sampling with guest VMs

2024-11-07 Thread Liang, Kan
On 2024-11-07 2:03 p.m., Colton Lewis wrote: > Previously any PMU overflow interrupt that fired while a VCPU was > loaded was recorded as a guest event whether it truly was or not. This > resulted in nonsense perf recordings that did not honor > perf_event_attr.exclude_guest and recorded guest I

Re: [PATCH v7 4/5] x86: perf: Refactor misc flag assignments

2024-11-07 Thread Liang, Kan
On 2024-11-07 2:03 p.m., Colton Lewis wrote: > Break the assignment logic for misc flags into their own respective > functions to reduce the complexity of the nested logic. > > Signed-off-by: Colton Lewis > Reviewed-by: Oliver Upton > --- Acked-by: Kan Liang Thanks, Kan > arch/x86/events/

Re: [PATCH v7 2/5] perf: Hoist perf_instruction_pointer() and perf_misc_flags()

2024-11-07 Thread Liang, Kan
On 2024-11-07 2:03 p.m., Colton Lewis wrote: > For clarity, rename the arch-specific definitions of these functions > to perf_arch_* to denote they are arch-specifc. Define the > generic-named functions in one place where they can call the > arch-specific ones as needed. > > Signed-off-by: Colt

Re: [PATCH v6 5/5] perf: Correct perf sampling with guest VMs

2024-11-06 Thread Liang, Kan
On 2024-11-06 2:53 p.m., Oliver Upton wrote: > On Wed, Nov 06, 2024 at 11:07:53AM -0500, Liang, Kan wrote: >>> +#ifndef perf_arch_guest_misc_flags >>> +static inline unsigned long perf_arch_guest_misc_flags(struct pt_regs >>> *regs) >>> +{ >>>

Re: [PATCH v6 4/5] x86: perf: Refactor misc flag assignments

2024-11-06 Thread Liang, Kan
On 2024-11-06 3:02 p.m., Oliver Upton wrote: > On Wed, Nov 06, 2024 at 11:03:10AM -0500, Liang, Kan wrote: >>> +static unsigned long common_misc_flags(struct pt_regs *regs) >>> +{ >>> + if (regs->flags & PERF_EFLAGS_EXACT) >>> + return P

Re: [PATCH v6 5/5] perf: Correct perf sampling with guest VMs

2024-11-06 Thread Liang, Kan
On 2024-11-05 2:56 p.m., Colton Lewis wrote: > Previously any PMU overflow interrupt that fired while a VCPU was > loaded was recorded as a guest event whether it truly was or not. This > resulted in nonsense perf recordings that did not honor > perf_event_attr.exclude_guest and recorded guest I

Re: [PATCH v6 4/5] x86: perf: Refactor misc flag assignments

2024-11-06 Thread Liang, Kan
On 2024-11-05 2:56 p.m., Colton Lewis wrote: > Break the assignment logic for misc flags into their own respective > functions to reduce the complexity of the nested logic. > > Signed-off-by: Colton Lewis > Reviewed-by: Oliver Upton > --- > arch/x86/events/core.c| 31

Re: [PATCH v2 6/9] PCI: Add pci_find_dvsec_capability to find designated VSEC

2021-09-23 Thread Liang, Kan
On 9/23/2021 1:26 PM, Ben Widawsky wrote: Add pci_find_dvsec_capability to locate a Designated Vendor-Specific Extended Capability with the specified DVSEC ID. The Designated Vendor-Specific Extended Capability (DVSEC) allows one or more vendor specific capabilities that aren't tied to the ve

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-24 Thread Liang, Kan
, Nov 12, 2020 at 4:54 AM Liang, Kan wrote: On 11/11/2020 11:25 AM, Peter Zijlstra wrote: On Mon, Nov 09, 2020 at 09:49:31AM -0500, Liang, Kan wrote: - When the large PEBS was introduced (9c964efa4330), the sched_task() should be invoked to flush the PEBS buffer in each context switch

Re: [PATCH 3/5] perf/core: Fix arch_perf_get_page_size()

2020-11-16 Thread Liang, Kan
On 11/13/2020 6:19 AM, Peter Zijlstra wrote: The (new) page-table walker in arch_perf_get_page_size() is broken in various ways. Specifically while it is used in a locless manner, it doesn't depend on CONFIG_HAVE_FAST_GUP nor uses the proper _lockless offset methods, nor is careful to only rea