On Tue, Dec 20, 2016 at 1:47 PM, Brendan Gregg via iovisor-dev
<[email protected]> wrote:
> I'd like to BPF_PERF_OUTPUT() at a high rate (>1000/s), and have these
> buffered and read in groups by bcc. But the typical loop we're using:
>
> b["events"].open_perf_buffer(print_event)
> while 1:
>     b.kprobe_poll()
>
> Wakes up as quick as it can, without much buffering. Lots of context
> switching.
>
> I can fix it by inserting a delay:
>
> b["events"].open_perf_buffer(print_event)
> while 1:
>     sleep(0.1)
>     b.kprobe_poll()

that's not very pretty.
May be we should make these two configurable:
  attr.sample_period = 1;
  attr.wakeup_events = 1;
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to