This file contains hidden or 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
#!/usr/bin/env bpftrace | |
/* | |
* extfragsnoop Trace events that induce system external memory fragmentation. | |
* For Linux, uses bpftrace and eBPF. | |
* | |
* This traces when a fallback event occurs, particularly mixed pageblocks that | |
* occur as a consequence of pollution upon memory pressure. | |
* | |
* Unmovable memory is the enemy of a de-fragmenting process (compaction), so | |
* gather such allocations as well as situations when movable memory becomes |
This file contains hidden or 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
{ | |
"target": "linux/amd64", | |
"http": "127.0.0.1:56741", | |
"workdir": "workdir", | |
"kernel_obj": "/home/dave/code/linux/", | |
"image": "/img/bullseye.img", | |
"sshkey": "/img/bullseye.id_rsa", | |
"syzkaller": "/home/dave/code/syzkaller", | |
"procs": 8, | |
"type": "qemu", |
This file contains hidden or 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
{ | |
"target": "linux/amd64", | |
"http": "127.0.0.1:56741", | |
"workdir": "workdir", | |
"kernel_obj": "/home/dave/code/linux/", | |
"image": "/img/bullseye.img", | |
"sshkey": "/img/bullseye.id_rsa", | |
"syzkaller": "/home/dave/code/syzkaller", | |
"procs": 8, | |
"type": "qemu", |
This file contains hidden or 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
{ | |
"target": "linux/amd64", | |
"http": "127.0.0.1:56741", | |
"workdir": "workdir", | |
"kernel_obj": "/home/dave/code/linux/", | |
"image": "/img/bullseye.img", | |
"sshkey": "/img/bullseye.id_rsa", | |
"syzkaller": "/home/dave/code/syzkaller", | |
"procs": 8, | |
"type": "qemu", |
This file contains hidden or 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
{ | |
"target": "linux/amd64", | |
"http": "127.0.0.1:56741", | |
"workdir": "workdir", | |
"kernel_obj": "/home/dave/code/linux/", | |
"image": "/img/bullseye.img", | |
"sshkey": "/img/bullseye.id_rsa", | |
"syzkaller": "/home/dave/code/syzkaller", | |
"procs": 8, | |
"type": "qemu", |
This file contains hidden or 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
Applies to the MM, but works on any subsystem. | |
Based on https://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html | |
$ git diff | |
diff --git a/Makefile b/Makefile | |
index c43d825a3c4c..3b9f43a112b8 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -523,7 +523,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE |
This file contains hidden or 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
// Copyright (C) Davidlohr Bueso, 2018. | |
// | |
// Convert the infamous mmap_sem to a range lock. | |
// Usage within the kernel source: | |
// | |
// $ make coccicheck MODE=patch COCCI=/path/to/mmap_sem.cocci | |
virtual patch | |
virtual context | |
virtual org |
This file contains hidden or 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
#!/bin/bash | |
# | |
# linux kernel CROSS make wrapper | |
# | |
# It will download/unpack the cross tool chain if necessary, | |
# then invoke make with suitable options. | |
# | |
# It detects ARCH in 4 ways. | |
# | |
# - make.i386 # make it a symlink to this script |
This file contains hidden or 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
#!/bin/bash | |
# | |
# Copyright (C) 2016 Davidlohr Bueso. | |
# | |
# Download and build/install one or more flavors of the Linux kernel. | |
# Do what you please with this, but you better be root if you expect | |
# it to do anything useful. Also, probably very SUSE specific, this | |
# is my only working env. | |
# | |
# Usage: |
NewerOlder