Re: [PATCH bpf-next v3 1/5] bpf: Free special fields after unlock in htab_lru_map_delete_node()

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

 



Hou Tao <houtao@xxxxxxxxxxxxxxx> writes:

> From: Hou Tao <houtao1@xxxxxxxxxx>
>
> When bpf_timer is used in LRU hash map, calling check_and_free_fields()
> in htab_lru_map_delete_node() will invoke bpf_timer_cancel_and_free() to
> free the bpf_timer. If the timer is running on other CPUs,
> hrtimer_cancel() will invoke hrtimer_cancel_wait_running() to spin on
> current CPU to wait for the completion of the hrtimer callback.
>
> Considering that the deletion has already acquired a raw-spin-lock
> (bucket lock). To reduce the time holding the bucket lock, move the
> invocation of check_and_free_fields() out of bucket lock. However,
> because htab_lru_map_delete_node() is invoked with LRU raw spin lock
> being held, the freeing of special fields still happens in a locked
> scope.
>
> Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx>

Reviewed-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>





[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