Prioritize requests based on cpu boosting level 09/277809/15
authorKonrad Lipinski <k.lipinski2@samsung.com>
Wed, 13 Jul 2022 14:46:48 +0000 (16:46 +0200)
committerKonrad Lipinski <k.lipinski2@samsung.com>
Fri, 22 Jul 2022 13:37:53 +0000 (15:37 +0200)
commit0c84562f06028a1f624d5f5bc4bc62d9545f5b9c
tree13ef5826f6b71298d107ea4e68d0d188323af44a
parent6971fdaa527bfc3ba86ad77ebb5c7c7c2ab47848
Prioritize requests based on cpu boosting level

There are three boosting levels at present, hence three distinct
priorities are introduced. Since the priority space is small, the
priority queue is implemented via an array of FIFO queues.

CPU priority inheritance from client to server is also included.

The boosting level and priority inheritance facilities are provided by
the capi-system-resource module. According to said facilities'
designers, querying the boosting level is most efficient when done
directly in the queried thread. Thus, when making a security manager
client request, the boosting level is obtained and prepended to the
request payload. This is also makes requests atomic and mitigates the
potential for priority races.

Change-Id: Icc10fb5e40fa74eafe16726d28ac66cd8b560810
packaging/security-manager.spec
src/client/CMakeLists.txt
src/client/include/client-request.h
src/common/include/protocols.h
src/common/include/utils.h
src/common/protocols.cpp
src/server/CMakeLists.txt
src/server/main/include/service-thread.h
src/server/main/server-main.cpp
src/server/main/socket-manager.cpp
src/server/rules-loader/security-manager-rules-loader.cpp