Skip to content

Instantly share code, notes, and snippets.

@mguentner
mguentner / .config
Created July 1, 2014 14:50
Linux mainline config for Xen
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.16.0-rc3 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
CONFIG_MIGHT_HAVE_PCI=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_NO_IOPORT_MAP=y
[ 1011.517357] xen_add_mach_to_phys_entry: cannot add pfn=0x00068d08 -> mfn=0x00058a91: pfn=0x00068d0d -> mfn=0x00058a91 already exists
[ 1011.596033] xen_add_mach_to_phys_entry: cannot add pfn=0x00068daf -> mfn=0x00058a94: pfn=0x00068d0c -> mfn=0x00058a94 already exists
[ 1011.599436] xen_add_mach_to_phys_entry: cannot add pfn=0x00068ab7 -> mfn=0x00058a93: pfn=0x00068aba -> mfn=0x00058a93 already exists
203.417037] xen_add_phys_to_mach_entry: cannot add pfn=0x00067a8c -> mfn=0x00058a24: pfn=0x00067a98 -> mfn=0x00058a24 already exists
[ 203.417111] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-rc3-00006-g16874b2-dirty #13
[ 203.417173] [<c021668c>] (unwind_backtrace) from [<c0212230>] (show_stack+0x10/0x14)
[ 203.417219] [<c0212230>] (show_stack) from [<c07e56e8>] (dump_stack+0x8c/0x9c)
[ 203.417263] [<c07e56e8>] (dump_stack) from [<c020edb8>] (__set_phys_to_machine_multi+0x208/0x274)
[ 203.417305] [<c020edb8>] (__set_phys_to_machine_multi) from [<c020ee8c>] (set_foreign_p2m_mapping+0x60/0x78)
[ 203.417356] [<c020ee8c>] (set_foreign_p2m_mapping) from [<c05e4058>] (xenvif_tx_action+0x204/0x5d8)
[ 203.417401] [<c05e4058>] (xenvif_tx_action) from [<c05e68b8>] (xenvif_poll+0x28/0x5c)
[ 203.417440] [<c05e68b8>] (xenvif_poll) from [<c0731270>] (net_rx_action+0x110/0x188)
[ 203.417480] [<c0731270>] (net_rx_action) from [<c024a3b8>] (__do_softirq+0x124/0x234)
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
index 97baf44..38291f6 100644
--- a/arch/arm/xen/p2m.c
+++ b/arch/arm/xen/p2m.c
@@ -41,10 +41,16 @@ static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)
parent = *link;
entry = rb_entry(parent, struct xen_p2m_entry, rbnode_phys);
- if (new->mfn == entry->mfn)
- goto err_out;
[ 1374.207509] xen_add_phys_to_mach_entry: cannot add pfn=0x00067e16 -> mfn=0x00045f49: pfn=0x00067e1e -> mfn=0x00045f49 already exists
[ 1374.248234] xen_add_phys_to_mach_entry: cannot add pfn=0x00067e8d -> mfn=0x00045f49: pfn=0x00067e99 -> mfn=0x00045f49 already exists
[ 1374.282505] xen_add_phys_to_mach_entry: cannot add pfn=0x00067e17 -> mfn=0x00045f41: pfn=0x00067e29 -> mfn=0x00045f41 already exists
[ 1374.285995] xen_add_phys_to_mach_entry: cannot add pfn=0x00067e1e -> mfn=0x00045f40: pfn=0x00067e10 -> mfn=0x00045f40 already exists
@mguentner
mguentner / build.sh
Last active August 29, 2015 14:03
Shadow build larger latex documents
#!/bin/bash
# Shadow $TMPDIR...
BASEDIR=$(pwd)
TMPDIR=$(mktemp -d /tmp/texbuild.XXXXXX)
FILES=("refdb.bib" "thesis.tex")
DIRECTORIES=("img" "code" "sections" "data" "data-xen")
if [ ! -d $TMPDIR ]
then
echo "Could not create tmp directory!"
exit 1
\usepackage{inconsolata}
\usepackage[T1]{fontenc}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\lstset{
numbers=left,
numbersep=5pt,
numberstyle=\tiny\color{mygray},
captionpos=b,
frame=tb,
[ 1269.994926] BTRFS info (device dm-4): disk space caching is enabled
[ 1270.011609] BTRFS: bdev /dev/mapper/ssddecrypt errs: wr 0, rd 0, flush 0, corrupt 13, gen 0
[ 1270.438137] BTRFS: checking UUID tree
[ 1270.463155] BTRFS critical (device dm-4): corrupt leaf, slot offset bad: block=211019628544,root=1, slot=107
[ 1270.463805] ------------[ cut here ]------------
[ 1270.463849] kernel BUG at fs/btrfs/ctree.c:5236!
[ 1270.463876] invalid opcode: 0000 [#1] PREEMPT SMP
[ 1270.463914] Modules linked in: crc32c_generic btrfs raid6_pq xor xts gf128mul ctr ccm uas usb_storage iTCO_wdt iTCO_vendor_support mousedev snd_hda_codec_analog snd_hda_codec_generic coretemp kvm_intel kvm ppdev microcode evdev mac_hid psmouse serio_raw pcspkr i2c_i801 arc4 btusb pcmcia bluetooth 6lowpan_iphc iwl3945 iwlegacy lpc_ich yenta_socket pcmcia_rsrc pcmcia_core mac80211 i915 snd_hda_intel snd_hda_controller cfg80211 snd_hda_codec snd_hwdep snd_pcm thermal thinkpad_acpi snd_timer wmi nvram drm_kms_helper led_class rfkill snd hwmon
Checking filesystem on /dev/mapper/ssddecrypt
UUID: 6c0e2db9-5ee5-46df-8596-1d4b4894e94a
checking extents
incorrect offsets 4353 4193
bad block 211019628544
Chunk[256, 228, 0]: length(4194304), offset(0), type(2) is not found in block group
Chunk[256, 228, 4194304]: length(8388608), offset(4194304), type(4) is not found in block group
Chunk[256, 228, 12582912]: length(8388608), offset(12582912), type(1) is not found in block group
Chunk[256, 228, 20971520]: length(8388608), offset(20971520), type(34) is not found in block group
Chunk[256, 228, 29360128]: length(1073741824), offset(29360128), type(36) is not found in block group
@mguentner
mguentner / container_performance.cpp
Created November 9, 2014 02:04
Multiset / List sorted
/* Compile with g++ --std=c++11 container_performance.cpp
* Sample output:
* Time for multiset: 13590 ms
* Time for List insert: 620 ms
* Time for List sort: 8989 ms
*/
#include <iostream>
#include <vector>
#include <set>