新建的目录和文件,不和原先RPM包目录相同。add one file to directory.1, put the file "wlh" to /root/rpmbuild/SOURCES/2.modify spec file.for example using grub2-tools rpm.line320 add, Source2: wlhline520 add,if [ ! -d ${RPM_BUILD_ROOT}/home/ ]; then&n...【阅读全文】
CPU Cache原理CPU缓存(Cache Memory)是位于CPU与内存之间的临时存储器,它的容量比内存小的多但是交换速度却比内存要快得多。缓存的出现主要是为了解决CPU运算速度与内存读写速度不匹配的矛盾,因为CPU运算速度要比内存读写速度快很多,这样会使CPU花费很长时间等待数据到来或把数据写入内存。在缓存中的数据是内存...【阅读全文】
Kernel提供了kmem_cache_create函数用于创建Cache,下面我们直接从API入手。函数有点长,逐行分析一下。点击(此处)折叠或打开/** * kmem_cache_create - Create a cache. * @name: A string which is used in /proc/slabinfo to identify this cache...【阅读全文】
初始化的调用过程:start_kernel()->mm_init()->kmem_cache_init(),下面分析一下具体代码。点击(此处)折叠或打开/* * Initialisation. Called after the page allocator have been initialised and * before smp_init(). */...【阅读全文】