On Thu, Jun 9, 2022 at 7:27 AM Dave Marchevsky <davemarchevsky@xxxxxx> wrote: > >> + > >> + if (use_hashmap) { > >> + idx = bpf_get_prandom_u32() % hashmap_num_keys; > >> + bpf_map_lookup_elem(inner_map, &idx); > > Is the hashmap populated ? > > > > Nope. Do you expect this to make a difference? Will try when confirming key / > val size above. Martin brought up an important point. The map should be populated. If the map is empty lookup_nulls_elem_raw() will select a bucket, it will be empty and it will return NULL. Whereas the more accurates apples to apples comparison would be to find a task in a map, since bpf_task_storage_get(,F_CREATE); will certainly find it. Then if (l->hash == hash && !memcmp ... will be triggered. When we're counting nsecs that should be noticeable.