On Mon, Feb 15, 2021 at 3:45 AM Raga lahari <ragalahari.potti@...> wrote:
Hi,
I am trying to write a BPF perf event program to get CPU runq length. The Following is the code snippet. I am observing that a big integer (len is 2839296536 ) as queue length in trace output for some instances.
Can someone please let me know that whether this approach helps to get length?
Take a look at bcc tool runqlen.py. Did you get abnormal len with runqlen.py?
struct cfs_rq_partial {
struct load_weight load;
unsigned long runnable_weight;
unsigned int nr_running;
unsigned int h_nr_running;
};
#define _(P) ({typeof(P) val = 0; bpf_probe_read(&val, sizeof(val), &P); val;})