上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 41 下一页
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#controllers Controllers CPU The "cpu" controllers regulates distribution of CPU c 阅读全文
posted @ 2023-12-07 20:27 dolinux 阅读(276) 评论(0) 推荐(0)
摘要: 版本 Linux 6.5 背景 在学习cgroupv2的时候,想给子cgroup开启cpu控制器结果失败了: # 查看可以开启哪些控制器 root@ubuntu-vm:/sys/fs/cgroup# cat cgroup.controllers cpuset cpu io memory hugetl 阅读全文
posted @ 2023-12-06 23:45 dolinux 阅读(511) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html 另外两篇: Control Group v2 —— Controller(翻译 by chatgpt) Control Group v2 —— Namespace 阅读全文
posted @ 2023-12-06 19:52 dolinux 阅读(177) 评论(0) 推荐(0)
摘要: 在创建进程或者线程的时候,会调用copy_process,可以看到如下逻辑: /* ok, now we should be set up.. */ p->pid = pid_nr(pid); if (clone_flags & CLONE_THREAD) { p->group_leader = c 阅读全文
posted @ 2023-12-06 16:37 dolinux 阅读(92) 评论(0) 推荐(0)
摘要: 参考 https://www.kernel.org/doc/html/latest/admin-guide/clearing-warn-once.html 当WARN_ONCE或者WARN_ON_ONCE被第一次触发时,会输出调用栈,后面就不会了。可以使用下面的命令重置,这样再次触发时,还可以输出一 阅读全文
posted @ 2023-12-05 17:48 dolinux 阅读(466) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/mm/unevictable-lru.html Introduction This document describes the Linux memory manager's "Unevictable LRU" in 阅读全文
posted @ 2023-12-05 12:06 dolinux 阅读(233) 评论(0) 推荐(0)
摘要: 原文: https://www.kernel.org/doc/html/latest/mm/physical_memory.html Linux is available for a wide range of architectures so there is a need for an arch 阅读全文
posted @ 2023-12-04 22:34 dolinux 阅读(138) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/filesystems/path-lookup.html 内核中文件系统相关的文档汇总:Filesystems in the Linux kernel This write-up is based on three 阅读全文
posted @ 2023-12-04 21:46 dolinux 阅读(221) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/mm/numa.html This question can be answered from a couple of perspectives: the hardware view and the Linux so 阅读全文
posted @ 2023-12-04 21:39 dolinux 阅读(74) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html The memory management in Linux is a complex system that evolved over the years 阅读全文
posted @ 2023-12-04 20:54 dolinux 阅读(147) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/core-api/workqueue.html Introduction There are many cases where an asynchronous process execution context is 阅读全文
posted @ 2023-12-04 16:57 dolinux 阅读(126) 评论(0) 推荐(0)
摘要: 下面是trace扩展的项目地址: https://github.com/fujitsu/crash-trace 如果已经编译安装过crash,可以直接编译,然后使用extend工具加载. 加载模块 crash> extend /mnt/crash-trace/trace.so /mnt/crash- 阅读全文
posted @ 2023-12-03 22:06 dolinux 阅读(316) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/filesystems/vfs.html#overview-of-the-linux-virtual-file-system Introduction The Virtual File System (also kn 阅读全文
posted @ 2023-12-02 20:51 dolinux 阅读(355) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html What is the magic SysRq key? 什么是魔术SysRq键? It is a 'magical' key combo you can hit whi 阅读全文
posted @ 2023-12-01 21:21 dolinux 阅读(154) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html Objective 目标 Performance critical computing applications dealing with large me 阅读全文
posted @ 2023-12-01 19:29 dolinux 阅读(222) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/kernel-hacking/false-sharing.html What is False Sharing 什么是伪共享 False sharing is related with cache mechanism 阅读全文
posted @ 2023-12-01 11:01 dolinux 阅读(133) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html 内核中内存管理文档汇总:Memory Management Overview The intent of this file is to give a 阅读全文
posted @ 2023-12-01 10:37 dolinux 阅读(283) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/lockup-watchdogs.html The Linux kernel can act as a watchdog to detect both soft and hard lockup 阅读全文
posted @ 2023-11-30 21:06 dolinux 阅读(182) 评论(0) 推荐(0)
摘要: 原文: https://www.kernel.org/doc/html/latest/admin-guide/numastat.html /sys/devices/system/node/node*/numastat All units are pages. Hugepages have separ 阅读全文
posted @ 2023-11-30 16:04 dolinux 阅读(78) 评论(0) 推荐(0)
摘要: http://t.csdnimg.cn/zvjEx 阅读全文
posted @ 2023-11-29 11:30 dolinux 阅读(40) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/admin-guide/mm/numa_memory_policy.html What is NUMA Memory Policy? In the Linux kernel, "memory policy" dete 阅读全文
posted @ 2023-11-27 21:48 dolinux 阅读(507) 评论(0) 推荐(0)
摘要: 作者 内核代码 kernel\async.c include/linux/async.h 用途 Linux内核中的异步函数调用机制,其目标是通过并行执行来减少内核启动时间。在系统启动时,一些操作(如硬件延迟和发现操作)可以以非严格的顺序并行执行,从而实现异步处理。 该机制的关键概念是“序列cooki 阅读全文
posted @ 2023-11-26 11:38 dolinux 阅读(1000) 评论(0) 推荐(0)
摘要: 流程图 阅读全文
posted @ 2023-11-26 11:17 dolinux 阅读(49) 评论(0) 推荐(0)
摘要: 官网 Android Open Source Project 搭建构建环境 ubuntu18及以上:sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 li 阅读全文
posted @ 2023-11-11 11:38 dolinux 阅读(426) 评论(0) 推荐(0)
摘要: 流程图 模块数据的拷贝过程 首先从磁盘上打开,然后将文件fd传给内核,内核会将模块文件的内容拷贝到一个通过vmalloc分配的临时虚拟内存中,执行完一些检查后,再将模块内容拷贝到最终的虚拟内存中,然后进行重定位。最后的这块虚拟内存可以通过module_alloc也可以通过vzalloc分配,一般会调 阅读全文
posted @ 2023-11-09 17:18 dolinux 阅读(168) 评论(0) 推荐(0)
摘要: 原文:https://www.kernel.org/doc/html/latest/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html A Tour Through TREE_RCU's Expedited Grace Pe 阅读全文
posted @ 2023-11-06 22:25 dolinux 阅读(219) 评论(0) 推荐(0)
摘要: 原文: https://docs.kernel.org/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html August 8, 2017 This article was contributed by Paul E. McKenney I 阅读全文
posted @ 2023-11-06 19:47 dolinux 阅读(123) 评论(0) 推荐(0)
摘要: 有时我们有这样的需求,想查看某个进程的内核栈里的全部内容,介绍下面的几种做法: 方法1:得到进程的栈底地址以及栈大小,然后使用rd指令读取 使用mach指令获取内核栈的大小 crash> mach | grep SIZE MEMORY SIZE: 64 GB PAGE SIZE: 4096 KERN 阅读全文
posted @ 2023-11-04 20:51 dolinux 阅读(914) 评论(0) 推荐(0)
摘要: 作者 [email protected] 正文 uftrace专门用来跟踪用户态的C/C++以及Rust程序的执行,此外它也支持跟踪内核函数。 前一篇文章bpf_func_id是如何产生的?是以minimal为例,下面用uftrace跟踪一下执行流。为了可以让uftrace更好的工作,需要 阅读全文
posted @ 2023-11-02 17:19 dolinux 阅读(179) 评论(0) 推荐(1)
摘要: 作者 [email protected] 正文 以libbpf-bootstrap中的一个测试程序minimal.bpf.c为例。 下面是minimal.bpf.c的源码: minimal.bpf.c // SPDX-License-Identifier: GPL-2.0 OR BSD-3 阅读全文
posted @ 2023-11-01 23:26 dolinux 阅读(248) 评论(0) 推荐(0)
摘要: 目录EFLAGS/RFLAGSpush和pop操作异常和中断 EFLAGS/RFLAGS intel手册:3.4.3 EFLAGS Register push和pop操作 x86_64架构中,push和pop指令用于将数据压入栈中或从栈中弹出数据。具体运行过程如下: push指令的运行过程:(先减) 阅读全文
posted @ 2023-11-01 18:47 dolinux 阅读(129) 评论(0) 推荐(0)
摘要: 当我们知道某个数组的地址,可以使用下面的方法连续输出若干个数组成员的值,而不用每次手动计算下一个数组成员的地址,这里的数组地址可以是直接的内存地址,也可以是一个全局的符号名。 示例 /* page结构体在内存中是连续存放的,如果知道了一个page的地址,下面的 例子连续输出从指定的page开始的连续 阅读全文
posted @ 2023-10-31 17:13 dolinux 阅读(260) 评论(0) 推荐(0)
摘要: 参考 https://www.kernel.org/doc/html/latest/process/submitting-patches.html https://git-scm.com/docs/pretty-formats 如下所示: 做法 配置git [core] abbrev = 12 [p 阅读全文
posted @ 2023-10-30 15:19 dolinux 阅读(57) 评论(0) 推荐(0)
摘要: 参考 https://www.kernel.org/doc/html/latest/core-api/idr.html https://www.kernel.org/doc/html/latest/core-api/xarray.html 正文 在写内核代码时,可能会需要给数据结构分配一个唯一的ID 阅读全文
posted @ 2023-10-27 23:28 dolinux 阅读(392) 评论(0) 推荐(0)
摘要: 平台 ubuntu20.04 问题 在linux内核源码目录下执行下面的命令时: root@ubuntu-vm:/mnt/linux-6.5/tools/testing/selftests/bpf# make 报如下错误: progs/verifier_netfilter_retcode.c:41: 阅读全文
posted @ 2023-10-22 17:23 dolinux 阅读(89) 评论(0) 推荐(0)
摘要: 有时我们知道了一个文件的file或者dentry地址,想知道对应的文件的路径,下面介绍两种方法: file 如果知道的是file的地址,可以使用files命令: crash> foreach files | grep ffff88824243e000 1 ffff88824243e000 ffff8 阅读全文
posted @ 2023-10-21 20:59 dolinux 阅读(191) 评论(0) 推荐(0)
摘要: 参考 DDI0487J_a_a-profile_architecture_reference_manual.pdf B2.3 Definition of the Arm memory model B2.3.12 Memory barriers Data Memory Barrier (DMB) Da 阅读全文
posted @ 2023-10-21 15:10 dolinux 阅读(261) 评论(0) 推荐(0)
摘要: 参考 DDI0487J_a_a-profile_architecture_reference_manual.pdf D7: The AArch64 System Level Memory Model D7.5 Cache support D7.5.8 About cache maintenance 阅读全文
posted @ 2023-10-21 14:46 dolinux 阅读(86) 评论(0) 推荐(0)
摘要: 参考资料 DDI0487J_a_a-profile_architecture_reference_manual.pdf B2.3.12 Memory barriers Shareability and access limitations on the data barrier operations 阅读全文
posted @ 2023-10-21 14:32 dolinux 阅读(111) 评论(0) 推荐(0)
摘要: 作者 [email protected] 现象 在一台ARM64的Centos7虚拟机里加载 https://github.com/504ensicsLabs/LiME 编译出的内核模块时发生宕机: insmod lime.ko path=/root/allmem.dump format= 阅读全文
posted @ 2023-10-19 22:58 dolinux 阅读(711) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 41 下一页