[PATCH v3 0/1] Add thread affinity

Harvey Yang chenghaoyang at chromium.org
Mon Oct 14 08:58:55 CEST 2024


Hi folks,

This patch adds a method to set thread affinity, which is needed to
ensure performance in mtkisp7 pipeline handler and IPA.

This passes gitlab pipeline:
https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1289422

v3:
- Keep the cpu indices in ThreadData.

v2:
- Check cpu indices within [0, `std::thread::hardware_concurrency()`).
- Limit max size of cpus to be CPU_SETSIZE.

BR,
Harvey


Han-Lin Chen (1):
  libcamera: add method to set thread affinity

 include/libcamera/base/thread.h |  5 ++++
 src/libcamera/base/thread.cpp   | 52 +++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

-- 
2.47.0.rc1.288.g06298d1525-goog



More information about the libcamera-devel mailing list