Re: [PATCH 3/5] kernel/watchdog_hld: Ensure CPU-bound context when creating hardlockup detector event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat 2022-02-12 18:43:47, Lecopzer Chen wrote:
> From: Pingfan Liu <kernelfans@xxxxxxxxx>
> 
> from: Pingfan Liu <kernelfans@xxxxxxxxx>
> 
> hardlockup_detector_event_create() should create perf_event on the
> current CPU. Preemption could not get disabled because
> perf_event_create_kernel_counter() allocates memory. Instead,
> the CPU locality is achieved by processing the code in a per-CPU
> bound kthread.
> 
> Add a check to prevent mistakes when calling the code in another
> code path.
> 
> Signed-off-by: Pingfan Liu <kernelfans@xxxxxxxxx>
> Co-developed-by: Lecopzer Chen <lecopzer.chen@xxxxxxxxxxxx>
> Signed-off-by: Lecopzer Chen <lecopzer.chen@xxxxxxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux