aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2023-07-05 20:34:36 -0700
committerDaniel Borkmann <[email protected]>2023-07-12 23:45:22 +0200
commit9de3e81521b4d943c9ec27ae2c871292c12f1409 (patch)
tree3bcc519375c9727d3de5b5a8710c3a07082f5d4e /drivers/fpga/fpga-mgr.c
parenta80672d7e10edab757e771a1864ea2e1b9a31ac9 (diff)
bpf: Let free_all() return the number of freed elements.
Let free_all() helper return the number of freed elements. It's not used in this patch, but helps in debug/development of bpf_mem_alloc. For example this diff for __free_rcu(): - free_all(llist_del_all(&c->waiting_for_gp_ttrace), !!c->percpu_size); + printk("cpu %d freed %d objs after tasks trace\n", raw_smp_processor_id(), + free_all(llist_del_all(&c->waiting_for_gp_ttrace), !!c->percpu_size)); would show how busy RCU tasks trace is. In artificial benchmark where one cpu is allocating and different cpu is freeing the RCU tasks trace won't be able to keep up and the list of objects would keep growing from thousands to millions and eventually OOMing. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Hou Tao <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions