diff options
author | 2024-06-26 15:46:30 +0200 | |
---|---|---|
committer | 2024-06-27 11:00:48 +0200 | |
commit | fa03f398a8ac46f46927e0b509b302ebe0ed7e8a (patch) | |
tree | 0a6577f9023e66ff6e8c01317775f865958fc781 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | selftests/hid: add tests for hid_hw_output_report HID-BPF hooks (diff) | |
download | wireguard-linux-fa03f398a8ac46f46927e0b509b302ebe0ed7e8a.tar.xz wireguard-linux-fa03f398a8ac46f46927e0b509b302ebe0ed7e8a.zip |
HID: bpf: make hid_bpf_input_report() sleep until the device is ready
hid_bpf_input_report() is already marked to be used in sleepable context
only. So instead of hammering with timers the device to hopefully get
an available slot where the device is not sending events, we can make
that kfunc wait for the current event to be terminated before it goes in.
This allows to work with the following pseudo code:
in struct_ops/hid_device_event:
- schedule a bpf_wq, which calls hid_bpf_input_report()
- once this struct_ops function terminates, hid_bpf_input_report()
immediately starts before the next event
Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-9-cfd60fb6c79f@kernel.org
Acked-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions