Re: [PATCH bpf-next v3 1/8] bpf: Maintain the refcount of struct_ops maps directly.

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

 



On 3/6/23 3:54 PM, Kui-Feng Lee wrote:
@@ -646,6 +679,7 @@ const struct bpf_map_ops bpf_struct_ops_map_ops = {
      .map_alloc_check = bpf_struct_ops_map_alloc_check,
      .map_alloc = bpf_struct_ops_map_alloc,
      .map_free = bpf_struct_ops_map_free,
+    .map_free_rcu = bpf_struct_ops_map_free_rcu,

just came to my mind. Instead of having a rcu callback, synchronize_rcu() can be called in bpf_struct_ops_map_free(). Then the '.map_free_rcu' addition and its related change is not needed.


synchronize_rcu() probably blocks other subsystem, right?

.map_free is called from system_unbound_wq, so it can block.




[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