linux kernel
o_alpha
这个作者很懒,什么都没留下…
展开
-
kvm系列:1、如何编译
kvm编译过程步骤及常见问题解决方法原创 2023-06-08 08:55:22 · 714 阅读 · 0 评论 -
内核编译make bzImage 错误Unsupported relocation type: R_X86_64_PLT32 (4)
对于x86_64,不支持R_X86_64_32重定位,因为必须是 PIC。这表明 binutil 版本应该有问题,需要降级?原创 2023-06-07 17:27:57 · 438 阅读 · 0 评论 -
[Linux kernel][编译器]内核__read_mostly
读多写少,放在.data.read_mostly段。原创 2023-05-09 11:35:17 · 405 阅读 · 0 评论 -
make[1]: *** 没有规则可制作目标“/build”
KERN_VER = $(shell uname -r)KERN_DIR = /lib/modules/$(KERN_VER)/build解决办法:1、新建一个build文件夹2、检查KERN_VER最后面不要有空格原创 2020-05-30 14:20:14 · 13362 阅读 · 1 评论 -
call trace 格式
Call Trace:[<123>] a+0x10/0x8[<234>] b+0x0/0x10a具体出错的函数,0x8是a的长度,0x10是出错的指令在知a里的偏移。原创 2020-04-30 10:18:42 · 1206 阅读 · 0 评论 -
compile kernel with debug info
原创 2020-04-14 18:13:34 · 972 阅读 · 0 评论 -
[linux kernel] do_try_to_free_pages函数解析
/*This is the main entry point to direct page reclaim.If a full scan of the inactive list fails to free enough memory then weare “out of memory” and something needs to be killed.If the caller i...原创 2019-10-16 15:40:32 · 520 阅读 · 0 评论 -
linux gfpflags_allow_blocking()函数存疑
static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags){ return !!(gfp_flags & __GFP_DIRECT_RECLAIM);}为何要使用两个 "!" ?原创 2019-10-15 18:29:49 · 352 阅读 · 0 评论 -
【linux kernel】【VM管理】Linux overcommit处理机制
The Linux kernel supports the following overcommit handling modes0 - Heuristic overcommit handling. Obvious overcommits ofaddress space are refused. Used for a typical system. Itensures a seriously...原创 2019-08-07 15:18:39 · 242 阅读 · 0 评论 -
kmalloc详解与分配大小的限制
kmalloc是通过cache来实现的, 只不过每次kmalloc的大小不同, 因此是从不同的cache中分配:/* include/linux/slab.h */// 注意kmalloc是在头文件中定义的static inline void *kmalloc(size_t size, gfp_t flags){ if (__builtin_constant_p(size)) {/*_...转载 2019-07-08 15:49:47 · 4216 阅读 · 1 评论 -
【Linux kernel】task_struct解析
目录【Linux kernel】 task_struct解析1.首先什么是进程?1.1进程可以这样描述:1.2进程的两个基本元素1.3这里再明确以下几点:2.进程的描述3.剖析task_struct结构体(1)进程的状态(volatile long state)(2)进程的唯一标识(pid)(3)进程的标记:(unsigned int flags)...转载 2019-07-10 09:28:17 · 1226 阅读 · 0 评论