RE: [bpf-next v3] bpftool: profile online CPUs instead of possible

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

 



tong@ wrote:
> From: Tonghao Zhang <tong@xxxxxxxxxxxxx>
> 
> The number of online cpu may be not equal to possible cpu.
> "bpftool prog profile" can not create pmu event on possible
> but on online cpu.
> 
> $ dmidecode -s system-product-name
> PowerEdge R620
> $ cat /sys/devices/system/cpu/possible
> 0-47
> $ cat /sys/devices/system/cpu/online
> 0-31
> 
> Disable cpu dynamically:
> $ echo 0 > /sys/devices/system/cpu/cpuX/online
> 
> If one cpu is offline, perf_event_open will return ENODEV.
> To fix this issue:
> * check value returned and skip offline cpu.
> * close pmu_fd immediately on error path, avoid fd leaking.
> 
> Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command")
> Signed-off-by: Tonghao Zhang <tong@xxxxxxxxxxxxx>

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux