cpu-sched: Optimize search for cpu affinity fixed app 16/288416/1
authorUnsung Lee <unsung.lee@samsung.com>
Mon, 13 Feb 2023 06:11:30 +0000 (15:11 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Thu, 16 Feb 2023 08:44:40 +0000 (17:44 +0900)
commit21539f524ea116d6a4c313443958c707db0f3b0e
treec59e6934e8278b23280c3a84b48bda8efd2c51ab
parent1fec1856f59e80a56753636e477e3e0e4941bdd5
cpu-sched: Optimize search for cpu affinity fixed app

This patch includes
  - Change serach for fixed cpu affnity apps
(using the hashtable of apps by calling
'fixed_app_and_service_exist_check(name, APP_TYPE) func')

resourced manages all per-app configurations
('Private' section) using a hashtable.
On the other hand, resourced (cpu-sched) managed cpu affinity fixed apps
using a list instead of hashtable.
That is, when resourced (cpu-sched) detects app launch or app status change,
it searches the list linearly to know whether the app requires fixed cpu affinity or not.
(Linear search is normally slow when app list size is big)

resourced (cpu-shced) will
  - use the hastable of the per-app configuration when searching an app
  - use the legacy list to apply something to all fixed cpu affinity apps

Change-Id: I8bdd2e94c718c47912a2209fcdb78087815b3b10
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/resource-optimizer/cpu/cpu-sched.c