Re: [RFC PATCH] bpf: Add new bpf map type for timer

From: Alexei Starovoitov
Date: Wed Oct 21 2015 - 15:53:41 EST


On 10/21/15 3:02 AM, He Kuang wrote:
Here's a hypothetical scenario to illustrate the use of timer map.

A video frame is updated between frame_refresh_start() and
frame_refresh_end(), in most cases, the interval between these two
functions is less than 40ms, but occasionally over 200ms.

We can set a timer which alarm after the frame_refresh_start() has
been executed 42ms(slightly larger than 40ms) and destory this timer
if frame_refresh_end() is called. So, for most cases, the timer is not
triggered, this can significantly reduce the amount of trace data.

As a feature it sounds useful, but implementation is not acceptable.
You cannot have one callback stub for all users of this feature.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/