摘要: About Me 2013.07-2017.07: 🎓大学:机械电子专业、Linux驱动开发 2017.07-2017.end: 🐳工作:C程序员,视频会议系统服务器后端开发工程师 💻培训:shell,makefile,编码标准,C语言强化,以太网基础,IP路由,Git,需求分析,设计文档编写 阅读全文
posted @ 2023-11-20 00:25 LiYanbin 阅读(13) 评论(0) 推荐(0)
摘要: link: https://www.bluepuni.com/archives/ebpf-internals/ 这是 2021 年性能专家 Brendan Gregg(《性能之巅》作者)在 USENIX 上做的关于 eBPF 工作原理的演讲。最近在找这方面的资料,演讲的内容看着是相当的不错,可以作为 阅读全文
posted @ 2025-08-28 10:43 LiYanbin 阅读(11) 评论(0) 推荐(0)
摘要: 目录[1/3] 编译镜像使用国内镜像地址改成使用rock-5b cli编译基本过程[2/3] gen rootfsrootfs.json脚本输出(执行过程)[3/3] gen imagebuild-imagebuild-image output附:完整日志 https://radxaos-sdk.g 阅读全文
posted @ 2025-06-15 15:03 LiYanbin 阅读(101) 评论(0) 推荐(0)
摘要: link: https://radxaos-sdk.github.io/rsdk/install/devcontainer.html https://github.com/RadxaOS-SDK/rsdk 目录Requires下载工程代码创建编译环境run-rsdk-with-devcontaine 阅读全文
posted @ 2025-06-15 15:02 LiYanbin 阅读(127) 评论(0) 推荐(0)
摘要: link: https://mp.weixin.qq.com/s/00UGiwSf3G4IlGhTNbneWw 原创 zxc ZxcWorld 2025-05-15 20:50 接着上篇的,接下来移植内核和构建根文件。 1.Linux内核 1.1编译内核 进入docker环境,在Linux目录下。 阅读全文
posted @ 2025-05-21 09:54 LiYanbin 阅读(16) 评论(0) 推荐(0)
摘要: link: https://mp.weixin.qq.com/s/onCPCaphH3vhXQ1Of-nAbA 原创 zxc ZxcWorld 2025-05-14 21:36 这篇写的是rk399的内核移植,我以前写过一篇A33的内核移植,我在写这篇时,已经完成我自制的v3s验证板的所有功能,然后 阅读全文
posted @ 2025-05-21 09:51 LiYanbin 阅读(41) 评论(0) 推荐(0)
摘要: link: Hack the Virtual Memory: malloc, the heap & the program break 目录The heapmallocno malloc, no [heap]malloc(x)brk and sbrkmany mallocs - 首次malloc b 阅读全文
posted @ 2025-05-10 18:33 LiYanbin 阅读(30) 评论(0) 推荐(0)
摘要: link: Hack the Virtual Memory: drawing the VM diagram 目录The stackThe heapdiagram v1The executablediagram v2Command line arguments and environment vari 阅读全文
posted @ 2025-05-10 18:32 LiYanbin 阅读(27) 评论(0) 推荐(0)
摘要: 目录IntroHack The Virtual Memory, Chapter 0: Play with C strings & /procEnvironmentPrerequisitesVirtual MemoryC programstrdupHow big is the virtual memo 阅读全文
posted @ 2025-05-10 18:28 LiYanbin 阅读(15) 评论(0) 推荐(0)
摘要: G711 采样率8000,每个采样点以8位编码,编码速率为64Kbps 传输速率(带宽): 如果以20ms打包(打包的意思就是将采样到的数据通过网络传输出去,所以实际的带宽计算要加上各种包头) 那么就是每秒50个包,每个包有160个采样点(采样频率为8000,那么1ms的采样个数为8000/1000 阅读全文
posted @ 2025-02-24 00:58 LiYanbin 阅读(33) 评论(0) 推荐(0)
摘要: title: How to use the Arm Performance Monitoring Unit and System Counter minutes_to_complete: 90 who_is_this_for: This is an advanced topic for softwa 阅读全文
posted @ 2025-02-13 00:15 LiYanbin 阅读(71) 评论(0) 推荐(0)
摘要: 目录measure cache hit latencym1_rdtscp.cm1.cm1_repeat.c measure cache hit latency 主要设计说明: t1=rdtscp load data from cache #measure the cost cycles of thi 阅读全文
posted @ 2025-02-08 00:58 LiYanbin 阅读(19) 评论(0) 推荐(0)
摘要: 目录固定cpu频率max_ipc_test.sh 固定cpu频率 随笔-处理器微架构-固定cpu频率 - LiYanbin - 博客园 max_ipc_test.sh #!/bin/bash [[ -z "$1" || -z "$2" ]] && { echo "usage: $0 [cpuid] 阅读全文
posted @ 2025-01-16 01:51 LiYanbin 阅读(38) 评论(0) 推荐(0)
摘要: 目录[1/2] 固定cpu运行频率[2/2] 实验和实验结果 方法:执行时长/周期数 约等于 1/lscpu 查看到的频率 [1/2] 固定cpu运行频率 随笔-处理器微架构-固定cpu频率 - LiYanbin - 博客园 [2/2] 实验和实验结果 代码: #include <stdlib.h> 阅读全文
posted @ 2025-01-16 01:51 LiYanbin 阅读(34) 评论(0) 推荐(0)
摘要: 目录rdtsc codemrs pmccntr_el0 report 'Illegal instruction'附: arm pmu_enable rdtsc code #include <stdio.h> #include <stdint.h> #if defined(__i386__) || d 阅读全文
posted @ 2025-01-14 02:17 LiYanbin 阅读(73) 评论(0) 推荐(0)
摘要: link:Understanding Bandwidth and Latency - Ars Technica Understanding Bandwidth and Latency Ars discusses issues of bandwidth and latency inside hardw 阅读全文
posted @ 2025-01-04 15:28 LiYanbin 阅读(63) 评论(0) 推荐(0)
摘要: intel x86 芯片有提供CPUID指令,输出结果为16进制的数据,按照特定的格式进行解析即可 直接可用的工具有:cpuid/lscpu/x86info、getconf -a| grep -i cache 参考: intel CPUID instruction ARM 工具:cat /proc/ 阅读全文
posted @ 2024-12-30 17:40 LiYanbin 阅读(58) 评论(0) 推荐(0)
摘要: 目录Momory Ordering9.2.3.2 Neither Loads Nor Stores Are Reordered9.2.3.3 Stores Are Not Reordered With Earlier Loads9.2.3.4 Loads May Be Reordered with 阅读全文
posted @ 2024-12-14 17:42 LiYanbin 阅读(67) 评论(0) 推荐(0)
摘要: 目录HPC1 计算CPU频率[1/2] 固定cpu运行频率[2/2] 实验和实验结果HPC2 优化循环拆分成两条加法流水线(循环减半)实验结果变化分析指令数变化(汇编代码)循环次数减半HPC3 使用SIMD指令 HPC1 计算CPU频率 文章 高性能计算(HPC)系列之二:深入基础软件开发第一篇 方 阅读全文
posted @ 2024-12-07 12:12 LiYanbin 阅读(34) 评论(0) 推荐(0)
摘要: link: How to print the function name instead of the address for ustack #3108 ajor: Symbolication is based off the symbol table of the target applicati 阅读全文
posted @ 2024-12-04 19:17 LiYanbin 阅读(79) 评论(0) 推荐(0)
摘要: There are several types of cache misses, broadly categorized into compulsory, capacity, and conflict misses. These three are often referred to as the 阅读全文
posted @ 2024-10-01 14:56 LiYanbin 阅读(48) 评论(0) 推荐(0)
摘要: https://github.com/travisdowns/uarch-bench 下载-编译: 见仓库readme 使用: https://github.com/travisdowns/uarch-bench/wiki sudo ./uarch-bench --list sudo ./uarch 阅读全文
posted @ 2024-09-19 12:50 LiYanbin 阅读(30) 评论(0) 推荐(0)
摘要: [内联汇编很可怕吗?看完这篇文章,终结它!]weixin cnblogs __asm__ __volatile__ ( "mov %1, %%rbx\n\t" // dest值传入rbx "mov %2, %%rcx\n\t" // src传入rcx "_LOOP:\n\t" // 循环开始 "mo 阅读全文
posted @ 2024-09-18 23:12 LiYanbin 阅读(23) 评论(0) 推荐(0)
摘要: perf on-cpu xdata=perf.data;xpid=...; perf record -F 99 -p $xpid -o $xdata --call-graph dwarf -- sleep 20 直接在控制台上查看(perf report)或者生成火焰图: xdata=perf.da 阅读全文
posted @ 2024-08-31 23:50 LiYanbin 阅读(316) 评论(0) 推荐(0)
摘要: off-cpu: # test in centos7 echo 1 | sudo tee /proc/sys/kernel/sched_schedstats perf record -e sched:sched_stat_sleep -e sched:sched_switch -e sched:sc 阅读全文
posted @ 2024-08-31 23:48 LiYanbin 阅读(118) 评论(0) 推荐(0)
摘要: https://mazhen.tech/p/深入探索-perf-cpu-profiling-实现原理/ 深入探索 perf CPU Profiling 实现原理 perf 是什么 perf 是由 Linux 官方提供的系统性能分析工具 。我们通常说的 perf 实际上包含两部分: perf 命令,用 阅读全文
posted @ 2024-08-31 23:43 LiYanbin 阅读(573) 评论(0) 推荐(0)
摘要: 目录IBM Locking overheadIBM - Waiting for lockskernel doc - lock statQ: lock wait time and cpu wait time IBM Locking overhead https://www.ibm.com/docs/p 阅读全文
posted @ 2024-08-28 11:32 LiYanbin 阅读(41) 评论(0) 推荐(0)
摘要: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/5/html/systemtap_beginners_guide/futexcontentionsect#futexcontentionsect global thre 阅读全文
posted @ 2024-08-28 01:51 LiYanbin 阅读(23) 评论(0) 推荐(0)
摘要: 目录perf sched lat计算原理perf sched wait time计算过程perf sched 分析wait time perf sched lat计算原理 sched lat 计算过程: tracepoint:sched:sched_wakeup, tracepoint:sched: 阅读全文
posted @ 2024-08-26 01:13 LiYanbin 阅读(288) 评论(0) 推荐(0)
摘要: 目录linux load 计算过程ssar 架构ssar 使用示例ssar load2p -c使用问题: ReadLoadrdFileData failed. Make sure the param -c is correct, act field is not -.ssar编译安装linux lo 阅读全文
posted @ 2024-08-26 00:51 LiYanbin 阅读(57) 评论(0) 推荐(0)
摘要: 查看当前valgrind使用的debug文件对应的glibc-debuginfo版本: strace -e open valgrind ls 安装对应的版本: yum search glibc-debuginfo --showduplicates yum install -y ... 阅读全文
posted @ 2024-07-30 11:45 LiYanbin 阅读(350) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/20618308/fd-set-causing-seg-fault https://linux.die.net/man/3/fd_set Notes An fd_set is a fixed size buffer. Execu 阅读全文
posted @ 2024-07-24 10:32 LiYanbin 阅读(119) 评论(0) 推荐(0)
摘要: 目录执行过程lat_mem_rdstreampar_mem其他内容和测试原理待阅读源码研究 https://lmbench.sourceforge.net/man/par_mem.8.html https://francisz.cn/2022/05/12/lmbench/ 执行过程 执行过程分析: 阅读全文
posted @ 2024-06-26 01:32 LiYanbin 阅读(266) 评论(0) 推荐(0)
摘要: 目录编译运行过程分析附: 测试记录REFERENCE https://github.com/intel/lmbench 编译 安装依赖: yum install -y libtirpc libtirpc-devel 修改scripts/build脚本,在LDLIBS=-lm下面添加两行: LDLIB 阅读全文
posted @ 2024-06-24 18:35 LiYanbin 阅读(457) 评论(0) 推荐(0)
摘要: https://courses.fmsoft.cn/aple 目录一、内存管理虚拟内存原理C/C++程序的堆/栈管理APIC/C++进程的内存布局常用工具其他分配内存的方法常⻅内存使用问题二、文件和文件系统STDIO vs 传统文件读写系统调用问题:STDIO接口的主要功能有哪些?问题:读写文件时应 阅读全文
posted @ 2024-05-25 19:20 LiYanbin 阅读(29) 评论(0) 推荐(0)
摘要: 给普通人的26条提示工程策略:#ai##提示工程# 1、与LLM交流不需要礼貌,所以无需添加“请”、“如果你不介意”、“谢谢”、“我想”等短语,直接切入主题。 2、在提示中整合预期的受众,例如,受众是该领域的专家。 3、将复杂任务分解为一系列更简单的提示,进行互动对话。 4、使用肯定指令,例如“做. 阅读全文
posted @ 2024-05-25 08:59 LiYanbin 阅读(83) 评论(0) 推荐(0)
摘要: 对于数据读取和发送的,水平触发和边缘触发的区别: 参考:彻底搞懂epoll的LT模式和ET模式 关于数据的读比较好理解,无论是LT模式还是ET模式,监听到读事件从socket开始读数据就好了,只不过读的逻辑有些差异,LT模式下,读事件触发后,可以按需收取想要的字节数,不用把本次接收到的数据收取干净, 阅读全文
posted @ 2024-05-14 10:38 LiYanbin 阅读(153) 评论(0) 推荐(0)
摘要: 目录问题描述解决方案1-配置IP路由解决方案2-arp_announce另外一个问题-出网口 问题描述 默认的配置下,服务器多网卡同网段ip,外部访问任一ip,服务器返回的mac地址是某一张网卡的mac地址。 实验: 服务器配置: enp0s3 08:00:27:e3:f8:67 192.168.7 阅读全文
posted @ 2024-05-13 21:32 LiYanbin 阅读(2411) 评论(0) 推荐(0)
摘要: aliyun os centos 9 docker-ce install sudo wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo sud 阅读全文
posted @ 2024-05-13 21:13 LiYanbin 阅读(74) 评论(0) 推荐(0)
摘要: 客户端与服务器建立tcp连接后,在服务器上执行ss -im dst 目标IP地址来检查skmem rb值: tcp ESTAB 0 0 192.168.99.124:ssh 192.168.99.86:48270 skmem:(r0,rb369280,t0,tb87040,f0,w0,o0,bl0, 阅读全文
posted @ 2024-05-13 17:44 LiYanbin 阅读(399) 评论(0) 推荐(0)
摘要: 一台主机上只能保持最多 65535 个 TCP 连接吗? - 文礼的回答 - 知乎 https://www.zhihu.com/question/361111920/answer/1199952447 Q: 两个确定的ip地址.一个端口只能对应一个端口.怎么能64k*64k连接.明显只有64k链接吧 阅读全文
posted @ 2024-05-13 10:59 LiYanbin 阅读(30) 评论(0) 推荐(0)