Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-24 Thread K Prateek Nayak
Hello Valentin, On 1/14/2025 11:21 PM, Valentin Schneider wrote: [..snip..] diff --git a/include/linux/context_tracking_work.h b/include/linux/context_tracking_work.h index c68245f8d77c5..931ade1dcbcc2 100644 --- a/include/linux/context_tracking_work.h +++ b/include/linux/context_tracking_work.

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-20 Thread Valentin Schneider
On 17/01/25 09:15, Sean Christopherson wrote: > On Fri, Jan 17, 2025, Valentin Schneider wrote: >> On 14/01/25 13:13, Sean Christopherson wrote: >> > On Tue, Jan 14, 2025, Valentin Schneider wrote: >> >> +/** >> >> + * is_kernel_noinstr_text - checks if the pointer address is located in >> >> the

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-17 Thread Sean Christopherson
On Fri, Jan 17, 2025, Valentin Schneider wrote: > On 14/01/25 13:13, Sean Christopherson wrote: > > On Tue, Jan 14, 2025, Valentin Schneider wrote: > >> +/** > >> + * is_kernel_noinstr_text - checks if the pointer address is located in > >> the > >> + *.noinstr section > >> + *

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-17 Thread Valentin Schneider
On 14/01/25 13:48, Sean Christopherson wrote: > On Tue, Jan 14, 2025, Sean Christopherson wrote: >> On Tue, Jan 14, 2025, Valentin Schneider wrote: >> > +/** >> > + * is_kernel_noinstr_text - checks if the pointer address is located in >> > the >> > + *.noinstr section >> > + *

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-17 Thread Valentin Schneider
On 14/01/25 13:13, Sean Christopherson wrote: > On Tue, Jan 14, 2025, Valentin Schneider wrote: >> text_poke_bp_batch() sends IPIs to all online CPUs to synchronize >> them vs the newly patched instruction. CPUs that are executing in userspace >> do not need this synchronization to happen immediate

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-14 Thread Sean Christopherson
On Tue, Jan 14, 2025, Sean Christopherson wrote: > On Tue, Jan 14, 2025, Valentin Schneider wrote: > > +/** > > + * is_kernel_noinstr_text - checks if the pointer address is located in the > > + *.noinstr section > > + * > > + * @addr: address to check > > + * > > + * Returns: t

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-14 Thread Sean Christopherson
On Tue, Jan 14, 2025, Valentin Schneider wrote: > static __always_inline void arch_context_tracking_work(enum ct_work work) > { > switch (work) { > - case CT_WORK_n: > - // Do work... > + case CT_WORK_SYNC: > + sync_core(); Not your bug, but serialize() need

Re: [PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-14 Thread Sean Christopherson
On Tue, Jan 14, 2025, Valentin Schneider wrote: > text_poke_bp_batch() sends IPIs to all online CPUs to synchronize > them vs the newly patched instruction. CPUs that are executing in userspace > do not need this synchronization to happen immediately, and this is > actually harmful interference for

[PATCH v4 25/30] context_tracking,x86: Defer kernel text patching IPIs

2025-01-14 Thread Valentin Schneider
text_poke_bp_batch() sends IPIs to all online CPUs to synchronize them vs the newly patched instruction. CPUs that are executing in userspace do not need this synchronization to happen immediately, and this is actually harmful interference for NOHZ_FULL CPUs. As the synchronization IPIs are sent u