diff options
author | Andrii Nakryiko | 2024-04-06 09:11:11 -0700 |
---|---|---|
committer | Andrii Nakryiko | 2024-04-06 10:16:35 -0700 |
commit | 50408d7abea68e2d1ae3a9328e1a468b7089b11c (patch) | |
tree | be1f6764f6ef5a655bb0d2e5d60bf7c99659a9ae /include/acpi | |
parent | d564ffde5c832c46513e0189647abfde9833e590 (diff) | |
parent | 4d22ea94ea33550538b3b14429d52cb9f96ad2c3 (diff) |
Merge branch 'libbpf-api-to-partially-consume-items-from-ringbuffer'
Andrea Righi says:
====================
libbpf: API to partially consume items from ringbuffer
Introduce ring__consume_n() and ring_buffer__consume_n() API to
partially consume items from one (or more) ringbuffer(s).
This can be useful, for example, to consume just a single item or when
we need to copy multiple items to a limited user-space buffer from the
ringbuffer callback.
Practical example (where this API can be used):
https://github.com/sched-ext/scx/blob/b7c06b9ed9f72cad83c31e39e9c4e2cfd8683a55/rust/scx_rustland_core/src/bpf.rs#L217
See also:
https://lore.kernel.org/lkml/20240310154726.734289-1-andrea.righi@canonical.com/T/#u
v4:
- open a new 1.5.0 cycle
v3:
- rename ring__consume_max() -> ring__consume_n() and
ring_buffer__consume_max() -> ring_buffer__consume_n()
- add new API to a new 1.5.0 cycle
- fixed minor nits / comments
v2:
- introduce a new API instead of changing the callback's retcode
behavior
====================
Link: https://lore.kernel.org/r/20240406092005.92399-1-andrea.righi@canonical.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'include/acpi')
0 files changed, 0 insertions, 0 deletions