commit | f3c9ddf34aa40d4d39f38fe8a0c336ac8a0c457c | [log] [tgz] |
---|---|---|
author | Barret Rhoden <brho@cs.berkeley.edu> | Thu Nov 14 20:58:19 2019 -0500 |
committer | Barret Rhoden <brho@cs.berkeley.edu> | Thu Nov 14 20:58:19 2019 -0500 |
tree | f7e6c5cdee767f9a811c0e4801809e74a865c2c6 | |
parent | 8ce32bf08819c991977c67296eb8ed79696aaaaf [diff] |
Show inlined functions with bt-akaros.sh (kernel) I noticed syzkaller was printing out additional backtrace lines with info about inlining functions. addr2line does that for us, spitting the info out on two lines. With a little Bash magic, we can parse those lines too. Now something like this: #04 [<0xffffffffc2059e3e>] in __try_wait_any.isra.7 #05 [<0xffffffffc205bf3a>] in sys_waitpid #06 [<0xffffffffc205c849>] in syscall will show up as: #04 [<0xffffffffc2059e3e>] in __try_wait_any() at kern/src/syscall.c:1221 #05 [<0xffffffffc205bf3a>] in wait_any() at kern/src/syscall.c:1286 #05 [< (inlined by) >] in sys_waitpid() at kern/src/syscall.c:1329 #06 [<0xffffffffc205c849>] in syscall() at kern/src/syscall.c:2582 Frame 5 is repeated twice. The actual address, which the kernel's symtab says in in sys_waitpid(), is actually in wait_any(). Both the inlined function (wait_any()) and the function it is in are reported. The previous version of bt_akaros was printing the correct line number (1286); you'd just have to notice when you opened the code that it is in wait_any(), which might not be obvious if you're looking at a slightly different kernel source. Overall, this gives us more info when processing backtraces in that we can see the inlining and call graph. For example, here's a backtrace syzkaller caught: #03 [<0xffffffffc20496db>] in kref_put #04 [<0xffffffffc204d520>] in proc_destroy #05 [<0xffffffffc2058c36>] in sys_proc_destroy That doesn't tell us much. It is much better with inlining: #03 [<0xffffffffc20496db>] in kref_put at include/kref.h:68 #04 [< [inline] >] in proc_decref at src/process.c:587 #04 [< [inline] >] in proc_disown_children at src/process.c:853 #04 [<0xffffffffc204d520>] in proc_destroy at src/process.c:932 #05 [<0xffffffffc2058c36>] in sys_proc_destroy at src/syscall.c:852 Note this is independent of CONFIG_BETTER_BACKTRACES, which just sets -fno-optimize-sibling-calls. This change is all about getting more info from the backtrace the kernel spits out. BETTER_BACKTRACES is about making the kernel spit out more frames. Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
Akaros is an open source, GPL-licensed operating system for manycore architectures. Its goal is to provide better support for parallel and high-performance applications in the datacenter. Unlike traditional OSs, which limit access to certain resources (such as cores), Akaros provides native support for application-directed resource management and 100% isolation from other jobs running on the system.
Although not yet integrated as such, it is designed to operate as a low-level node OS with a higher-level Cluster OS, such as Mesos, governing how resources are shared amongst applications running on each node. Its system call API and “Many Core Process” abstraction better match the requirements of a Cluster OS, eliminating many of the obstacles faced by other systems when trying to isolate simultaneously running processes. Moreover, Akaros’s resource provisioning interfaces allow for node-local decisions to be made that enforce the resource allocations set up by a Cluster OS. This can be used to simplify global allocation decisions, reduce network communication, and ultimately promote more efficient sharing of resources. There is limited support for such functionality on existing operating systems.
Akaros is still very young, but preliminary results show that processes running on Akaros have an order of magnitude less noise than on Linux, as well as fewer periodic signals, resulting in better CPU isolation. Additionally, its non-traditional threading model has been shown to outperform the Linux NPTL across a number of representative application workloads. This includes a 3.4x faster thread context switch time, competitive performance for the NAS parallel benchmark suite, and a 6% increase in throughput over nginx for a simple thread-based webserver we wrote. We are actively working on expanding Akaros's capabilities even further.
Visit us at akaros.org
Instructions on installation and getting started with Akaros can be found in GETTING_STARTED.md
Our current documentation is very lacking, but it is slowly getting better over time. Most documentation is typically available in the Documentation/ directory. However, many of these documents are outdated, and some general cleanup is definitely in order.
Send an email to akaros+subscribe@googlegroups.com.
Or visit our google group and click “Join Group”
Create a new issue here.
brho
hangs out (usually alone) in #akaros on irc.freenode.net
. The other devs may pop in every now and then.
Instructions on contributing can be found in Documentation/Contributing.md.
The Akaros repository contains a mix of code from different projects across a few top-level directories. The kernel is in kern/
, userspace libraries are in user/
, and a variety of tools can be found in tools/
, including the toolchain.
The Akaros kernel is licensed under the GNU General Public License, version 2. Our kernel is made up of code from a number of other systems. Anything written for the Akaros kernel is licensed “GPLv2 or later”. However, other code, such as from Linux and Plan 9, are licensed GPLv2, without the “or later” clause. There is also code from BSD, Xen, JOS, and Plan 9 derivatives. As a whole, the kernel is licensed GPLv2.
Note that the Plan 9 code that is a part of Akaros is also licensed under the Lucent Public License. The University of California, Berkeley, has been authorised by Alcatel-Lucent to release all Plan 9 software previously governed by the Lucent Public License, Version 1.02 under the GNU General Public License, Version 2. Akaros derives its Plan 9 code from this UCB release. For more information, see LICENSE-plan9 or here.
Our user code is likewise from a mix of sources. All code written for Akaros, such as user/parlib/
, is licensed under the GNU LGPLv2.1, or later. Plan 9 libraries, including user/iplib
and user/ndblib
are licensed under the LGPLv2.1, but without the “or later”. See each library for details.
Likewise, tools/
is a collection of various code. All of our contributions to existing code bases, such as GCC, glibc, and busybox, are licensed under their respective projects' licenses.