内核版本3.18, 内存回收和内存分配连在一起的, 了解下:what is order in mm:mel gorman's book:the allocator maintains blocks of free pages where each block is a power of two number of pages. The exponent for the p...阅读全文


提交过程step1: get the right branch可以参考 MAINTAINERS文件,可能不对,直接看, 注意git pull到最新step2: generate one patchgit format-patch -1 commit_idcover-letter给一次提交多个用step3: check patch$ ./scri...阅读全文

Ubuntu下git send-email的使用

家里的nas/linaro上装个发内核补丁环境, rpi远程。Can't locate Net/SMTP/ in @INC要安装下面这个包sudo apt-get install libnet-smtp-ssl-perl安装完后有下面这个错误Send this email? ([y]es|[n]o|[q]uit|[a]ll): a Password: Nee...阅读全文


kswapd is a background pageout daemon,回收内存。唤醒的接口是 wake_all_kswapd/wakeup_kswapd,lets check./* * This is the 'heart' of the zoned buddy allocator. */ struct page * __alloc_pages_nodemask...阅读全文

理解Linux VM pressure

原生Linux内核是把vmpressure和CONFIG_MEMCG绑定的,是给用户态用的。makefile里写的很清楚:obj-$(CONFIG_MEMCG) += memcontrol.o page_cgroup.o vmpressure.o内核文档也放到了cgroup下memory.txt:Memory PressureThe pressure level noti...阅读全文


内核zone里有个水位的概念,根据这个水位判断内存压力,从而进行内存回收,版本3.18。struct zone { /* Read-mostly fields */ /* zone watermarks, access with *_wmark_pages(zone) macros */ unsigned long watermark[NR_WM...阅读全文