{"id":21607,"url":"https://patchwork.libcamera.org/api/covers/21607/?format=json","web_url":"https://patchwork.libcamera.org/cover/21607/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241014070000.658023-1-chenghaoyang@chromium.org>","date":"2024-10-14T06:58:55","name":"[v3,0/1] Add thread affinity","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"mbox":"https://patchwork.libcamera.org/cover/21607/mbox/","series":[{"id":4693,"url":"https://patchwork.libcamera.org/api/series/4693/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4693","date":"2024-10-14T06:58:55","name":"Add thread affinity","version":3,"mbox":"https://patchwork.libcamera.org/series/4693/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/21607/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9ED64C32F4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Oct 2024 07:00:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7DB4F6537C;\n\tMon, 14 Oct 2024 09:00:09 +0200 (CEST)","from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com\n\t[IPv6:2607:f8b0:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05A1865369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Oct 2024 09:00:07 +0200 (CEST)","by mail-pf1-x42e.google.com with SMTP id\n\td2e1a72fcca58-71e52582d0bso1069319b3a.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Oct 2024 00:00:06 -0700 (PDT)","from chenghaoyang-low.c.googlers.com.com\n\t(199.211.81.34.bc.googleusercontent.com. [34.81.211.199])\n\tby smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-71e675a9566sm1230461b3a.54.2024.10.14.00.00.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 14 Oct 2024 00:00:04 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Y04OncX8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1728889205; x=1729494005;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=53t7bexCnn4Q4iy1KyiyCKq1eCfD03Bd+FipL81AFcc=;\n\tb=Y04OncX8omnDoIMYqgc8OIJoLYEKPMi8fpDChFaf9UJ7h8eB5ARTdATjUyheVyXnZj\n\tFs9Lu6/dwOyVodcu8Xb7yNeU/Q9o20m4tPFcmCvBONeCm/tcLdzE6x/+WONCSWOVa3QM\n\tnVc6T3vx/aIZgankiQZtPN+Z2Nd9i9THc+jhg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1728889205; x=1729494005;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=53t7bexCnn4Q4iy1KyiyCKq1eCfD03Bd+FipL81AFcc=;\n\tb=xCUg5bucTKafAGqV3MFsspSRjzdM7ZLOlJapx5/fkQd2giOcz+Zf7B7TmwKY8+TEWZ\n\tZ8B8a0CQrK0VDgaqlJcODE3oZTPiHooPQcjnehpwZPRrGdJ61mjBQR6zFgGcxF/vk6ui\n\tSFT2ahrGR35Fja1qC/hFbLgGYsRJ2tCevujf/HrN7b/tB/oCuq1DQvU5h4PAbPDxkadx\n\tdv1D7EUibMTyZ2k6LW+QcINdorbgMeSsP0NPGy2YVeeW9cW4gh+YB0o/tzQKGuDA1CjL\n\txHwlL06QtxVGA+c4+MjckhHKMSaYwok6bpITGrJehBKjrcWMW83ghkF7PmV+b0WaunPt\n\t2AEw==","X-Gm-Message-State":"AOJu0Yxe887MgUmvJE5HKFNQuzDmQ5cKN3IlDRLWZvM0TzjM4/iBIH4v\n\t+XWcAv0RHbQrPVCfeR1jSxw1ubKW8/RhllemmgzG3IrZcTb6Eh+VYBaop743fmM/+zdvYn7hOT8\n\t=","X-Google-Smtp-Source":"AGHT+IF5l8qLWeDHdlXDj4DEmNXn6WGG0wMXO9zzQlYqilQ7wWicJEv/UP244LH0mPIZeFBgwbhOzQ==","X-Received":"by 2002:a05:6a00:181d:b0:71e:104d:6316 with SMTP id\n\td2e1a72fcca58-71e4c1bfb5cmr10592440b3a.21.1728889205039; \n\tMon, 14 Oct 2024 00:00:05 -0700 (PDT)","From":"Harvey Yang <chenghaoyang@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"Harvey Yang <chenghaoyang@chromium.org>","Subject":"[PATCH v3 0/1] Add thread affinity","Date":"Mon, 14 Oct 2024 06:58:55 +0000","Message-ID":"<20241014070000.658023-1-chenghaoyang@chromium.org>","X-Mailer":"git-send-email 2.47.0.rc1.288.g06298d1525-goog","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi folks,\n\nThis patch adds a method to set thread affinity, which is needed to\nensure performance in mtkisp7 pipeline handler and IPA.\n\nThis passes gitlab pipeline:\nhttps://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1289422\n\nv3:\n- Keep the cpu indices in ThreadData.\n\nv2:\n- Check cpu indices within [0, `std::thread::hardware_concurrency()`).\n- Limit max size of cpus to be CPU_SETSIZE.\n\nBR,\nHarvey\n\n\nHan-Lin Chen (1):\n  libcamera: add method to set thread affinity\n\n include/libcamera/base/thread.h |  5 ++++\n src/libcamera/base/thread.cpp   | 52 +++++++++++++++++++++++++++++++++\n 2 files changed, 57 insertions(+)"}