gen8_oa_read(9)
π gen8_oa_read(9) β the kernel API manual, but make it make sense
okay so bestie, welcome to the <cyan>Kernel API Manual</cyan> entry for gen8_oa_read β¨ no cap, this one's genuinely cute once you get the vibe.
πΈ NAME πΈ
gen8_oa_read β copy status records then buffered OA reports π
β¨ SYNOPSIS β¨
int gen8_oa_read (struct i915_perf_stream *stream , char __user *buf ,
size_t count , size_t *offset );
π ARGUMENTS π
streamβ an i915-perf stream, and it's gotta be one that was opened for OA metrics πbufβ the destination buffer that userspace handed over π«Άcountβ how many bytes userspace actually wants to read, literally the byte countoffsetβ (inout) the current position for writing intobuf, so it goes in and comes back out updated π¦
π DESCRIPTION π
So what this icon does: it checks the OA unit status registers, and if it needs to, it appends the corresponding status records for userspace β think a buffer-full condition, that kind of thing β and then it kicks off appending any buffered OA reports. it's giving "cleanup then deliver" main character energy π
It updates offset according to the number of bytes successfully copied into the userspace buffer. tracking the receipts, fr fr β¨
NB: some data may be successfully copied to the userspace buffer even if an error is returned, and that's reflected in the updated offset. so yeah β error doesn't always mean nothing happened, bestie π keep an eye on that offset π
π₯ RETURN π₯
zero on success, or a negative error code π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/i915/i915_perf.c plus the whole friend group:
i915 Perf Overview(9)i915 Perf History and Comparison with Core Perf(9)OA Tail Pointer Race(9)struct perf_open_properties(9)oa_buffer_check_unlocked(9)append_oa_status(9)append_oa_sample(9)gen8_append_oa_reports(9)gen7_append_oa_reports(9)gen7_oa_read(9)i915_oa_wait_unlocked(9)i915_oa_poll_wait(9)i915_oa_read(9)oa_get_render_ctx_id(9)oa_put_render_ctx_id(9)i915_oa_stream_enable(9)i915_oa_stream_disable(9)i915_oa_stream_init(9)i915_perf_read(9)i915_perf_poll_locked(9)i915_perf_poll(9)i915_perf_enable_locked(9)i915_perf_disable_locked(9)i915_perf_ioctl_locked(9)i915_perf_ioctl(9)i915_perf_destroy_locked(9)i915_perf_release(9)i915_perf_open_ioctl_locked(9)read_properties_unlocked(9)i915_perf_open_ioctl(9)i915_perf_register(9)i915_perf_unregister(9)i915_perf_add_config_ioctl(9)i915_perf_remove_config_ioctl(9)i915_perf_init(9)i915_perf_fini(9)i915_perf_ioctl_version(9)
that's the whole page, bestie, you ate that π«Ά this one lives in <purple>./drivers/gpu/drm/i915</purple> and it's dated <mint>October 2026</mint>, and yes the footer still says gen8_oa_read(9) because we stay on brand πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms