Conversation
This introduces user/vpipe-capture-userptr.c, a V4L2 USERPTR ingress harness against vivid plus vb2_vmalloc. Two modes share a 4-buffer pool: noreset reuses the slot indefinitely and shows that vb2 caches the (userptr, length) pin per slot so re-QBUF skips GUP and per-frame minor faults stay at zero. reset allocates a fresh anonymous mapping before freeing the previous one so the kernel cannot reuse the VA, forces the cache to miss, and surfaces the full GUP slow-path cost as 75 minor faults per QBUF (== sizeimage / PAGE_SIZE on the validated guest). Per-QBUF fault accounting wraps only the QBUF ioctl with getrusage RUSAGE_SELF deltas so other buffers' submissions in the same thread do not pollute the count. Each CSV row pairs a DQBUF with the matching QBUF that submitted it for both latency and fault delta. scripts/bench_userptr.sh wraps bench_perf.sh with a reset/noreset allowlist on the mode argument. scripts/summarize-benchmark.py gains a phase_userptr mode with column validation, empty-CSV handling, non-numeric row diagnostics, and a warmup-row count derived from the distinct buffer indices observed in the CSV so the script stays in sync if the harness BUFFER_COUNT changes. Change-Id: I537abe4bb0bb4d4e9615cc17d5bec28330da7c0f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces user/vpipe-capture-userptr.c, a V4L2 USERPTR ingress harness against vivid plus vb2_vmalloc. Two modes share a 4-buffer pool: noreset reuses the slot indefinitely and shows that vb2 caches the (userptr, length) pin per slot so re-QBUF skips GUP and per-frame minor faults stay at zero. reset allocates a fresh anonymous mapping before freeing the previous one so the kernel cannot reuse the VA, forces the cache to miss, and surfaces the full GUP slow-path cost as 75 minor faults per QBUF (== sizeimage / PAGE_SIZE on the validated guest).
Per-QBUF fault accounting wraps only the QBUF ioctl with getrusage RUSAGE_SELF deltas so other buffers' submissions in the same thread do not pollute the count. Each CSV row pairs a DQBUF with the matching QBUF that submitted it for both latency and fault delta.
scripts/bench_userptr.sh wraps bench_perf.sh with a reset/noreset allowlist on the mode argument. scripts/summarize-benchmark.py gains a phase_userptr mode with column validation, empty-CSV handling, non-numeric row diagnostics, and a warmup-row count derived from the distinct buffer indices observed in the CSV so the script stays in sync if the harness BUFFER_COUNT changes.
Change-Id: I537abe4bb0bb4d4e9615cc17d5bec28330da7c0f