Re: [PATCH v2] tracing/hwlat: Bind the sampler kthread instead of setting its affinity
From: Wenwu Hou
Date: Sun Nov 29 2026 - 21:12:56 EST
On Fri, Nov 27, 2026 at 11:00:37AM -0500, Steven Rostedt wrote:
> On Thu, 26 Nov 2026 17:16:42 +0800
> Wenwu Hou <hwenwur@xxxxxxxxx> wrote:
>
> > >
> > > Right, the affinity should only be changed by the kernel if tracing_cpumask is
> > > written. Otherwise it doesn't seem to make sense to let the user play with the
> > > affinity.
> >
> > I agree. Perhaps v1 is better.
>
> A version of it. It needs to remove and prevent user space from modifying
> the tasks affinity.
v1 already leaves PF_NO_SETAFFINITY set for hwlatd via kthread_bind_mask(), which prevents userspace from changing the task's affinity.
Is there anything else you would like removed or changed?
> -- Steve