- Allocate an L4 task from the task server. The task server upon initialization got all available tasks from the resource manager (RMGR). However it does all these requests only to get informed about how many tasks are in the system. It then returns these tasks to RMGR immediately.
- Setup Linux-internal task data.
- Call the task server once again to start the task.
- The task server now calls RMGR to really start the task.
Having a look at what is done in task server and RMGR to startup a task shows, that it is simply some l4_task_new() system call. The first idea to improve the situation is to let L4Linux do so itself. I therefore added a new allocate_chief() call to the task server interface. This allocates a task for the client and makes this client become the task's chief. This is necessary, because only a task's chief is allowed to start and stop it.
This alone speeds up task creation and termination by around 10%, since we save one L4Linux -> task server -> RMGR call chain for both, starting and stopping a task. Another improvement can be made by caching unused tasks. If a task is terminated, we do not need to return it to the task server, but can put it into a cache instead. It can then later be restarted as a new L4Linux task. This removes every interaction with L4 servers from the start/stop process of a task. All in all new task management and task caching do result in 20% performance increase for task creation.
No comments:
Post a Comment