Skip to content

Instantly share code, notes, and snippets.

View kernelOfTruth's full-sized avatar

kernelOfTruth aka. kOT, Gentoo user kernelOfTruth

  • private
  • Vienna, Austria
View GitHub Profile
#!/usr/bin/env python
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 textwidth=79 autoindent
"""
Python source code
Last modified: 15 Feb 2014 - 13:38
Last author: lmwangi at gmail com
Displays the available memory fragments
by querying /proc/buddyinfo
From 56919e922baa154ac6e498bcc1520dc965065265 Mon Sep 17 00:00:00 2001
From: Colin Cross <[email protected]>
Date: Fri, 22 Jul 2011 14:57:09 -0700
Subject: [PATCH 1/5] cpu_pm: call notifiers during suspend
Implements syscore_ops in cpu_pm to call the cpu and
cpu cluster notifiers during suspend and resume,
allowing drivers receiving the notifications to
avoid implementing syscore_ops.
From fb62238974be027f3619881fc336ae41c01cfe76 Mon Sep 17 00:00:00 2001
From: Russell King <[email protected]>
Date: Sat, 9 Jul 2011 16:09:43 +0100
Subject: [PATCH 01/13] ARM: vfp: fix a hole in VFP thread migration
Fix a hole in the VFP thread migration. Lets define two threads.
Thread 1, we'll call 'interesting_thread' which is a thread which is
running on CPU0, using VFP (so vfp_current_hw_state[0] =
&interesting_thread->vfpstate) and gets migrated off to CPU1, where
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 0fb32ce..6bbde84 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -2403,6 +2403,9 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
dmu_object_type_t type;
boolean_t is_metadata;
+ if (bp == NULL)
+ return (0);
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
<info>
<title>American Medical Association (Alphabetical Bibliography</title>
<id>http://www.zotero.org/styles/ama-alphabetical</id>
<link href="http://www.zotero.org/styles/ama-alphabetical"/>
<author>
<name>Julian Onions</name>
<email>[email protected]</email>
</author>
@kernelOfTruth
kernelOfTruth / memtest.sh
Created December 2, 2015 00:46 — forked from dasjoe/memtest.sh
Efficient, multithreaded RAM stress tester, using md5sum
#!/bin/bash
# source: https://groups.google.com/a/zfsonlinux.org/d/msg/zfs-discuss/i09_VBXAyig/UWjPa23cQ0YJ
pids=""
tdir=/tmp/memtest.$$
function cleanup()
{
[[ -n "${pids}" ]] && kill -9 ${pids} &> /dev/null || true
@kernelOfTruth
kernelOfTruth / gist:ca85a32db3f2db554cda
Created January 6, 2016 23:22
zfs illumos-gate sha2.h commits, libzfs_sendrecv.c
commit 52524f69f3692eb5443c2737c8f4fd9b11670d24
Author: Joshua M. Clulow <[email protected]>
Date: Thu Feb 2 20:16:51 2012 +1100
2111 begone, pkcs11_kms!
Reviewed by: Alexander Eremin <[email protected]>
Reviewed by: Jason King <[email protected]>
Reviewed by: Garrett D'Amore <[email protected]>
Approved by: Richard Lowe <[email protected]>
diff -Nrupad rsync-3.1.2/checksum.c rsync-3.1.2_fadvise/checksum.c
--- rsync-3.1.2/checksum.c 2015-08-08 21:47:03.000000000 +0200
+++ rsync-3.1.2_fadvise/checksum.c 2016-08-16 23:47:30.861982388 +0200
@@ -24,6 +24,9 @@
extern int checksum_seed;
extern int protocol_version;
extern int proper_seed_order;
+#ifdef WITH_DROP_CACHE
+#define close(fd) fadv_close(fd)
+#endif
@kernelOfTruth
kernelOfTruth / Grandtheftauto5-linux.md
Created September 15, 2016 20:50 — forked from BeauBouchard/Grandtheftauto5-linux.md
How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

Date Completed: Not done yet ~~ April 23rd 2015

My Test System

  • Video Card: Nvidia GTX 465 (lol right? Game runs shitty)
  • Driver: tested on 331.38, works on 331.38+
  • OS: Ubuntu x64 14.04
  • POL: I used Play on linux 4, I assume most of the capabilities are in winetricks
  • Wine: wine-staging Sun, 19 Apr 2015 version 1.7.41 x64 bit
@kernelOfTruth
kernelOfTruth / low-latency_rt.sh
Created October 4, 2016 20:32
Raising IRQ priority of device threads
#!/bin/bash
# Sorted view:
# ps -eLo rtprio,cls,pid,pri,nice,cmd | grep "FF" | sort -r
# ps -eLo pid,cls,rtprio,pri,nice,cmd | grep -i "irq"
# For a non-RT kernel, use kernel option: threadirqs
# http://subversion.ffado.org/wiki/IrqPriorities