随笔分类 -  Efficiency

ftrace: tracing linux function calls
摘要:First confirm that you have root privilege. Second check the config of kernel that you have the configs on: Last you confirm you have your debugfs/tra 阅读全文

posted @ 2018-10-28 16:26 三叁 阅读(197) 评论(0) 推荐(0)

lock: mutex/spinlock/shared lock
摘要:mutex( x lock): when a mutex lock is obtained, others cannot obtain the same mutex while the lock is not freed. shared lock( s lock): when a shared lo 阅读全文

posted @ 2018-10-25 00:26 三叁 阅读(178) 评论(0) 推荐(0)

event based: libev libevent libuv
摘要:libev First let's talk about libev, it is a lib used in ss. The coding style of libev is ugly. To see man page of libev by: man ./ev.3 3 files need to 阅读全文

posted @ 2018-10-19 03:13 三叁 阅读(362) 评论(0) 推荐(0)

Linux Network: Receive side notes
摘要:At kernel init, each logical core has a thread called ksoftirq/%d running. These threads are brought up by the initial function net_dev_init(). While 阅读全文

posted @ 2018-08-31 05:54 三叁 阅读(244) 评论(0) 推荐(0)

TCP options: Intro
摘要:According to RedHat accessories, TCP_NODELAY: each call to write(fd, buf...) will be sent out as packet. This leads to poor overall performance when m 阅读全文

posted @ 2018-08-30 20:58 三叁 阅读(133) 评论(0) 推荐(0)

slab/slub/slob: Linux kernel memory mngmt
摘要:In linux mm folder, there are 3 files that about kmalloc/kmem, slab/slub/slob, where slab.c defines general memory usage, slub.c defines modern memory 阅读全文

posted @ 2018-07-24 11:38 三叁 阅读(356) 评论(0) 推荐(0)

Systemtap: learning notes
摘要:Before using stap, the kernel-debuginfo-$(uname -r), kernel-debuginfo-common-$(uname -m)-$(uname -r) and kernel-devel-$(uname -r) should be installed. 阅读全文

posted @ 2018-07-15 18:48 三叁 阅读(283) 评论(0) 推荐(0)

golang: impressed by its cross compiling possibilities
摘要:However till now golang's debug functionality seems far from okay. During debug you cannot print map objects. And also from debugging related aspects, 阅读全文

posted @ 2018-07-08 07:48 三叁 阅读(125) 评论(0) 推荐(0)

Crossbuild: with crosstool-ng
摘要:Before preceding, several things need to be checked: There are too many tutorials on how to build with ct-ng, I only list several useful steps for fut 阅读全文

posted @ 2018-07-04 06:35 三叁 阅读(308) 评论(0) 推荐(0)

LeetCode: fault list
摘要:1. malloc memory should always use the following form: 2. memset memory to 0 should use the form: 3. malloc(0) might also return address which is non- 阅读全文

posted @ 2018-06-02 02:09 三叁 阅读(219) 评论(0) 推荐(0)

Filesystem: managing
摘要:Linux block devices can be partitioned into several partitions, max to several tens or hundreds primary partitions. (According to MBR or GPT) In order 阅读全文

posted @ 2018-05-27 13:20 三叁 阅读(147) 评论(0) 推荐(0)

Rule of Programming: C
摘要:My summary after reading this. Before doing large memory writes: _mm*_stream_s[i,s,d]*: non-temporal memory store: When data is produced and not (imme 阅读全文

posted @ 2018-05-24 12:04 三叁 阅读(165) 评论(0) 推荐(0)

CPU: nomenclature
摘要:Some definitive names: 1. Socket: the thing that plug into the motherboard slot; 2. Core: multiple counts of these hardware things are included in 1 c 阅读全文

posted @ 2018-05-24 05:24 三叁 阅读(160) 评论(0) 推荐(0)

GNU Autoconf: Intro
摘要:some frequently used AC macros: AC_INIT :must AC_OUTPUT :must AC_PREREQ :determine ac version so that needed features are included AC_CONFIG_SRCDIR :d 阅读全文

posted @ 2018-03-06 11:58 三叁 阅读(263) 评论(0) 推荐(0)

TSC: Intro & Comments
摘要:From wiki quote: The Time Stamp Counter (TSC) is a 64-bit register present on all x86 processors since the Pentium. It counts the number of cycles sin 阅读全文

posted @ 2018-01-20 12:12 三叁 阅读(222) 评论(0) 推荐(0)

C: release & debug differences (might apply to all programming languages)
摘要:Sometimes we build a program as release and when debugging, some variables cannot be printed out, and displayed as optimized out. That is because the 阅读全文

posted @ 2017-12-21 20:12 三叁 阅读(172) 评论(0) 推荐(0)

Cygwin/mingw: Intro & Diffs & Notes
摘要:Firstly, compile something with cygwin is to compile something for cygwin1.dll, compile something with mingw is compile something for windows. Here li 阅读全文

posted @ 2017-11-30 21:00 三叁 阅读(147) 评论(0) 推荐(0)

Composer: PHP package manager
摘要:To use composer, first system must satisfy php environment: To install composer, try either: enable packagist repo globally: [its speed seems not fast 阅读全文

posted @ 2017-11-24 11:31 三叁 阅读(451) 评论(0) 推荐(0)

net-snmp: introduction
摘要:SNMP is a protocol that enables server remote-info-exchange. Which according to wikipedia: it [collecting and organizing information about managed dev 阅读全文

posted @ 2017-10-09 18:11 三叁 阅读(468) 评论(0) 推荐(0)

Haskell: install from source
摘要:First we need to determine the version of ghc to be installed. Newest version not always good. Since we are going to install ghc-mod as final destinat 阅读全文

posted @ 2017-09-22 12:07 三叁 阅读(301) 评论(0) 推荐(0)

导航