libbpf ringbuf manager starvation

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

 



Hello there,

When playing with the (relatively) new ringbuf api we encountered
something that we believe can be an interesting usecase.
When registering multiple rinbufs to the same ringbuf manager, one of
which is highly active, other ringbufs may starve. Since libbpf
(e)polls on all the managed ringbufs at once and then tries to read
*as many samples as it can* from ready ringbufs, it may get stuck
indefinitely on one of them, not being able to process the other.
We know that the current ringbuf api exposes the epoll_fd so that one
can implement the epoll logic on his own, but this sounds to us like a
not so advanced usecase that may be worth taking care of specifically.
Does allowing to specify a maximum number of samples to consume sounds
like a reasonable addition to the ringbuf api?

Thanks



[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