Skip to content

Instantly share code, notes, and snippets.

@sandip4n
sandip4n / tinymembench-page-clearing-results.txt
Created May 11, 2022 07:44
9900K CPU 5.0GHz Core 4.7GHz Uncore, 2-channel IMC 4x8GB DDR4-4000 16-17-17-36 2T Dual Rank
tinymembench v0.4.9 (simple benchmark for memory throughput and latency)
---
===============================================================================
== Page Clearing alternatives bandwidth tests ==
== ==
== Here we will do bandwidth test of all the page clearing alternatives. ==
== First feature detection is done i.e., if a instruction is micro code ==
== optimized, and that feature is present on system being tested, then only ==
== results are displayed, otherwise user is informed about feature not ==
@sandip4n
sandip4n / tinymembench-results.txt
Last active May 10, 2022 19:16
9900K CPU 5.0GHz Core 4.7GHz Uncore, 2-channel IMC 4x8GB DDR4-4000 16-17-17-36 2T Dual Rank
tinymembench v0.4.9 (simple benchmark for memory throughput and latency)
==========================================================================
== Memory bandwidth tests ==
== ==
== Note 1: 1MB = 1000000 bytes ==
== Note 2: Results for 'copy' tests show how many bytes can be ==
== copied per second (adding together read and writen ==
== bytes would have provided twice higher numbers) ==
== Note 3: 2-pass copy means that we are using a small temporary buffer ==

Qemu Setup

Build from source

$ git clone https://git.qemu.org/git/qemu.git
$ cd qemu
$ mkdir -p build && cd build
$ ../configure --target-list=x86_64-softmmu
$ make -j$(nproc)
@sandip4n
sandip4n / ibanez-pickup-wiring.md
Last active February 22, 2022 21:33
Ibanez Pickup Wiring Reference

Ibanez Pickup Wiring

⚠️ None of this is guaranteed to work. Use at your own risk.

Pickup Pinout

Seymour Duncan

Color Coil Connection
/*
* Compile as:
* powerpc64-linux-gnu-gcc -o vma-coverage -g -O0 \
* -mcpu=powerpc64 -mno-altivec \
* -mno-vsx -nostdlib -static \
* vma-coverage.c
*/
#ifndef __powerpc64__
#error "unsupported architecture"
/*
* Compile with a cross toolchain and run as shown below.
* $ powerpc64le-linux-gnu-gcc clone-test.c -O0 -nostdlib -static -o clone-test
* $ ./build/POWER/gem5.debug --debug-flags=TLB,ExecAll configs/example/se.py -c ./clone-test
*/
#ifndef __powerpc64__
#error "unsupported architecture"
#endif

Qemu Quick Start

- Create a new virtual disk image
	(host) $ qemu-img create -f qcow2 <path-to-qcow2-image> 30G

- Resize an existing virtual disk image
	(host) $ qemu-img resize <path-to-qcow2-image> +5G

- Resize guest root partition (LVM)
LRU Organization
----------------
struct pagevec
--> Collection of pages to be put in an appropriate LRU list
--> Intermediary for moving pages between active and inactive LRU lists
or for adding and removing pages to and from LRU lists
--> Holds up to 15 pages
--> Managed via helper functions
--> pagevec_add() adds a page and returns the remaining number of free slots

For building on a POWER server running GNU/Linux. First, clone the Linus Torvalds' kernel source tree.

$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux

To be on the safe side, use one of the standard distro-provided build configurations.

$ cp /boot/config-$(uname -r) .config
/*
* Compile with a cross toolchain and run as shown below.
* $ powerpc64le-linux-gnu-gcc clone-test.c -O0 -nostdlib -static -o clone-test
* $ ./build/POWER/gem5.debug --debug-flags=ExecAll,Registers configs/example/se.py -n 2 -c ./clone-test
*/
#ifndef __powerpc64__
#error "unsupported architecture"
#endif