[libcamera-devel] [PATCH v4 0/7] libcamera: V4L2BufferCache: Improve cache eviction strategy
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Mar 5 21:38:01 CET 2020
Hello,
This series improves the function of the V4L2BufferCache and how
it selects which cache entries to evict. This solves a real issue where
if the cache is not pre-allocated the cache can perform suboptimally and
not utilise all the entries in the cache.
Patch 1/7 fix an error in the test class BufferSource found as code in
v1 of this series was based on it. 2/7 Extracts the BufferSource from
the camera buffer import test so it can be used in the new test
for the V4L2BufferCache. Patch 3/7, 4/7 and 5/7 fix small issues with
the V4L2BufferCache pointed out in review of v2. Patch 6/7 add tests
which breaks without the improved cache eviction strategy introduced in
7/7.
Niklas Söderlund (7):
test: camera: buffer_import: Fix error messages
test: Extract BufferSource class out of camera tests to libtest
libcamera: V4L2BufferCache: Mark Entry::operator==() as const
libcamera: V4L2BufferCache: Use the entry reference
libcamera: V4L2BufferCache: Check for hot hit first
test: v4l2_videodevice: Add test for V4L2BufferCache
libcamera: V4L2BufferCache: Improve cache eviction strategy
src/libcamera/include/v4l2_videodevice.h | 9 +-
src/libcamera/v4l2_videodevice.cpp | 31 ++--
test/camera/buffer_import.cpp | 92 +---------
test/libtest/buffer_source.cpp | 98 +++++++++++
test/libtest/buffer_source.h | 32 ++++
test/libtest/meson.build | 11 +-
test/v4l2_videodevice/buffer_cache.cpp | 215 +++++++++++++++++++++++
test/v4l2_videodevice/meson.build | 1 +
8 files changed, 379 insertions(+), 110 deletions(-)
create mode 100644 test/libtest/buffer_source.cpp
create mode 100644 test/libtest/buffer_source.h
create mode 100644 test/v4l2_videodevice/buffer_cache.cpp
--
2.25.1
More information about the libcamera-devel
mailing list