Skip to content

Instantly share code, notes, and snippets.

View christian-marie's full-sized avatar

Christian Marie christian-marie

View GitHub Profile
// This is free and unencumbered software released into the public domain.
#include <sys/sysinfo.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/sysinfo.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <stdlib.h>
diff -uNr kernel-3.10.0-123.el7/linux-3.10.0-123.el7.x86_64/include/trace/events/vmscan.h kernel-3.10.0-123.el7p/linux-3.10.0-123.el7.x86_64/include/trace/events/vmscan.h
--- a/include/trace/events/vmscan.h 2014-05-05 14:58:32.000000000 +0000
+++ b/include/trace/events/vmscan.h 2014-11-12 00:07:59.193842097 +0000
@@ -36,6 +36,25 @@
(RECLAIM_WB_ASYNC) \
)
+TRACE_EVENT(mm_vmscan_frob,
+
+ TP_PROTO(unsigned long zonefile, unsigned long zonefree),
root@a006 ~ # cat /proc/buddyinfo
Node 0, zone DMA 1 0 1 1 1 1 1 0 1 1 3
Node 0, zone DMA32 611 162 11718 13371 8910 3151 553 127 17 0 0
Node 0, zone Normal 8273 725 140722 98296 51919 30097 12783 3721 960 0 0
Node 1, zone Normal 44944 80907 149363 125764 68301 31908 12931 3584 1177 0 0
root@a006 ~ # echo 1 > /proc/sys/vm/compact_memory
root@a006 ~ # cat /proc/buddyinfo
Node 0, zone DMA 1 0 1 1 1 1 1 0 1 1 3
Node 0, zone DMA32 707 169 11721 13350 8910 3151 553 127 17 0 0
Node 0, zone Normal 9390 791 140727 98228 51902 30098 12783 3721 960 0 0
root@a005 ~ # cat /proc/buddyinfo
Node 0, zone DMA 1 0 1 1 1 1 1 0 1 1 3
Node 0, zone DMA32 1343 10432 17643 15075 7721 2429 891 264 41 0 0
Node 0, zone Normal 8553 177548 171495 92449 55937 25275 10835 4712 1495 0 0
Node 1, zone Normal 33779 103158 190284 74350 37246 24498 14280 7306 1967 278 2
root@a005 ~ # echo 3 > /proc/sys/vm/drop_caches
root@a005 ~ # echo 1 > /proc/sys/vm/compact_memory
root@a005 ~ # cat /proc/buddyinfo
Node 0, zone DMA 1 0 1 1 1 1 1 0 1 1 3
Node 0, zone DMA32 14261 16596 18636 14409 7362 2363 1040 358 89 0 0
[3440039.787961] ib1: failed to allocate tx qp: -12
[3443189.780418] kworker/u97:2: page allocation failure: order:4, mode:0x1040d0
[3443189.780426] CPU: 22 PID: 1675 Comm: kworker/u97:2 Tainted: GF O-------------- 3.10.0-123.el7.x86_64 #1
[3443189.780428] Hardware name: Dell Inc. PowerEdge R720xd/0X3D66, BIOS 2.2.2 01/16/2014
[3443189.780444] Workqueue: ipoib ipoib_cm_tx_start [ib_ipoib]
[3443189.780447] 00000000001040d0 000000006f24d4f6 ffff88013342b840 ffffffff815e19ba
[3443189.780458] ffff88013342b8d0 ffffffff811472e0 000000000000000e 0000000000000000
[3443189.780462] ffff88083ffd9e80 ffff88083ffd9e80 ffff88013342b8a0 000000006f24d4f6
[3443189.780467] Call Trace:
[3443189.780478] [<ffffffff815e19ba>] dump_stack+0x19/0x1b
root@a005 ~ # xfs_info /var/lib/ceph/osd/ceph-87
meta-data=/dev/sdj1 isize=2048 agcount=4, agsize=54902719 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0
data = bsize=4096 blocks=219610875, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=107231, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Node 0, zone DMA -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
Node 0, zone DMA32 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.981 0.991 0.996 0.998
Node 0, zone Normal -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.990 0.995 0.998 0.999
Node 1, zone Normal -1.000 -1.000 -1.000 -1.000 0.937 0.969 0.985 0.993 0.996 0.998 0.999
--
-- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
module Main where
static void *main_thread() {
typedef struct {
void *socket;
timeval timeout;
current_msg;
}
socket sockets[10];
for( 0..10) {