Skip to content

Instantly share code, notes, and snippets.

@wdvill
wdvill / qemu-tracing.md
Created October 9, 2021 02:26 — forked from mcastelino/qemu-tracing.md
Tracing QEMU-KVM Interactions

Tracing QEMU-KVM Interactions

But default in linux you can figure out how many times and for what reasons there is a VM Exit from a VM into the kvm kernel module. However given the ubiquity of vhost and the ability of kvm to emulate most device models directly in the kernel, most of those VM exits do not result in a transition from host kernel into the QEMU. The transitions from VM -> kvm -> QEMU are typically the most expensive.

Here we try to figure out how many of the VM Exits result in the invocation of QEMU.

Tracking VM-KVM Interactions

This can be done very simply with perf

@wdvill
wdvill / vps配置科学上网]shadowsocks服务端配置.md
Created March 11, 2021 01:24
vps配置科学上网]shadowsocks服务端配置

vps配置科学上网]shadowsocks服务端配置

标签: 垃圾箱

1. Update 2015/03/30 竟然乱码...整个重新整理编辑了一下。非专业行为,如有不当之处,欢迎指出。
2. Update 2015/04/05 linux可参考Fedora21[配置shadowsocks for chrome](http://blog.csdn.net/bit_Line/article/details/44888213),用于配置客户端,Debian系列/Red Hat系列可通用。
相比Python版本的ss客户端,会轻量级一些。windows用户客户端安装很方便,直接下载后一路“下一步”,下载见:
[shadowsocks-c#版](http://sourceforge.net/projects/shadowsocksgui/files/dist/)win7/XP或者已安装.Net2.0的用户,下载Shadowsocks-win-x.x.x.zip; Win8+/.Net4.0下载Shadowsocks-win-dotnet4.0-x.x.x.zip即可。
最后只需要配置参数(包括linux和windows),请直接参看第3条更新中的链接文章。
@wdvill
wdvill / cpuid_features.c
Created March 2, 2021 08:56 — forked from macton/cpuid_features.c
Print cpuid features
// See: Intel Intrinsics Guide https://software.intel.com/sites/landingpage/IntrinsicsGuide/
// See: CPUID Explorer http://www.flounder.com/cpuid_explorer1.htm
// See: Playing with cpuid http://newbiz.github.io/cpp/2010/12/20/Playing-with-cpuid.html
// See: MSDN __cpuid, __cpuidex http://msdn.microsoft.com/en-us/library/hskdteyh.aspx
// See: Notes on MMX/SSE and a searchable table of intrinsics. http://www.taffysoft.com/pages/20120418-01.html
// See: AMD CPUID Specification http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/25481.pdf
#if defined(__GNUC__)
#include <stdint.h>
#include <cpuid.h>