[v2,0/1] Add thread affinity
mbox series

Message ID 20241012124926.1049458-1-chenghaoyang@chromium.org
Headers show
Series
  • Add thread affinity
Related show

Message

Harvey Yang Oct. 12, 2024, 12:47 p.m. UTC
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/1288675

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 |  6 +++++
 src/libcamera/base/thread.cpp   | 47 +++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)