cpu-sched: Optimize search for cpu affinity fixed app 82/288182/5
authorUnsung Lee <unsung.lee@samsung.com>
Mon, 13 Feb 2023 06:11:30 +0000 (15:11 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 16 Feb 2023 00:55:31 +0000 (00:55 +0000)
commit0c8248c1d99c57a8d173604dc5f56c4bd82f2e60
tree78fc3f7fffa1d7b9a736fd046ff19459ebc894ee
parent4bd2ee3dd53feec12bf465c9318a969ee2292942
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: I9340e1e7c6796463625660780b82f30c7a91a025
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/resource-optimizer/cpu/cpu-sched.c