forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lkl: add support for direct syscalls
This patch reworks the LKL syscall interface to avoid the performance penalty caused by the context switch between the host thread and the associated syscall kernel thread. The main idea is to associate Linux threads (struct task_struct) with existing host threads instead of creating a new coresponding "syscall thread" for host threads that issue system calls. When issuing a system call, from a host thread, all we need to do is: (a) make sure we exclusively have the cpu by calling lkl_cpu_get() and (b) make sure we are in the right Linux thread context by calling switch_to_host_task(). When a host thread finishes a system call, while it does yield the cpu, it does not scheduled out the Linux thread context to keep it available for the next system call. This means that while interrupts will run, kernel threads will be delayed until the next system call. The patch improves the LKL sycall latency by ~60 times on my machine on synthetic benchmarks. This patch also removes the lkl_create_syscall_thread() and lkl_stop_syscall_thread() as they are not necessary anymore. Signed-off-by: Octavian Purdila <tavi@cs.pub.ro>
- Loading branch information
Showing
6 changed files
with
82 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.