新编译的驱动,加载时报错“no symbol version for module_layout”,查看模块vergmaic完全一致。 #insmod drivers/block/nvme.ko insmod: error inserting ‘drivers/block/nvme.ko’: -1 Invalid module format
READ MORE »perf Examples
来源:http://www.brendangregg.com/perf.html These are some examples of using the perf Linux profiler, which has also been called Performance Counters for Linux (PCL), Linux perf events (LPE), or perf_events. Like Vince Weaver, I’ll call it perf_events so that you can search on that term later. Searching for just “perf” finds sites on the police, petroleum, weed control, […]
READ MORE »基于SCSI设备Linux文件系统写数据内核代码开销
问题:在Linux 文件系统I/O写数据操作,内核代码开销到底多少? 目标:分析基于SCSI设备Linux文件系统写数据时内核代码开销。
READ MORE »Linux内核基于SCSI设备文件系统AIO读写栈
AIO同步写 #fio -ioengine=libaio -bs=4k -direct=1 -thread -rw=write -size=100M -filename=aio.tst -name=”4K write test” -iodepth=1 -runtime=10 CPU: 21 PID: 19747 Comm: fio Not tainted 3.10.0-327.alios7.x86_64.debug #50 Hardware name: Inspur SA5212M4/YZMB-00370-102, BIOS 4.1.8 07/02/2016 ffff885e5d29c000 000000004e14ca4c ffff885e61e7bcc0 ffffffff8162a7c9 ffff885e61e7bd28 ffffffffa0173b2e ffff885e61e7bcf0 ffffffff8141789a ffff885d1d925200 ffff885e604b6a08 ffff885e61e7bd28 ffff885e61e7bd08 Call Trace: [<ffffffff8162a7c9>] dump_stack+0x19/0x1b [<ffffffffa0173b2e>] _scsih_qcmd+0x4be/0x5f0 [mpt3sas] [<ffffffff8141789a>] ? […]
READ MORE »Linux内核基于SCSI设备文件系统读写栈
同步写 #fio -bs=4k -direct=1 -thread -rw=write -size=1G -filename=ssd.tst -name=”sdx” -iodepth=1 -runtime=10 [10940.221722] CPU: 0 PID: 128839 Comm: fio Not tainted 3.10.0-327.alios7.x86_64.debug #50 [10940.221723] Hardware name: Inspur SA5212M4/YZMB-00370-102, BIOS 4.1.8 07/02/2016
READ MORE »Linux内核SCSI块设备读写栈信息
以mpt3sas驱动为例,从用户态发送读写命令到控制器驱动入口。 [<ffffffff8162a7c9>] dump_stack+0x19/0x1b [<ffffffffa0173b2e>] _scsih_qcmd+0x4be/0x5f0 [mpt3sas] [<ffffffff8141789a>] ? scsi_setup_cmnd+0xfa/0x180 [<ffffffff81410b3a>] scsi_dispatch_cmd+0xaa/0x230
READ MORE »关闭/打开Linux内核dmesg中时间戳信息
关闭时间戳信息(Disable dmesg timestamp) echo N > /sys/module/printk/parameters/time 打开时间戳信息(Enable dmesg timestamp) echo Y > /sys/module/printk/parameters/time
READ MORE »如何获取Linux内核空间read/write操作文件名
在Linux内核空间中,如何获取读写的文件名? How to get read/write filename in linux kernel space? 如ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)中如何获取读写的文件名? 答案: file->f_path.dentry->d_iname
READ MORE »Linux内核I/O scsi_done()及__blk_complete_request()调用栈信息
<IRQ> [<ffffffff8162a629>] dump_stack+0x19/0x1b [<ffffffff812c96d4>] __blk_complete_request+0x144/0x150 [<ffffffff812c9701>] blk_complete_request+0x21/0x30 [<ffffffff81417033>] scsi_done+0x53/0xa0 [<ffffffffa00ef34b>] _scsih_io_done+0x1ab/0xb60 [mpt3sas]
READ MORE »升级/修改Linux内核时,如何关闭生成rescue image
问题: 通过源码编译方式升级/修改Linux内核时,由于/boot目录空闲有限,生成rescue initramfs文件时,由于空间不足,生成img文件失败。 #df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 51475068 17528648 31308596 36% / devtmpfs 197963156 0 197963156 0% /dev tmpfs 197980432 176 197980256 1% /dev/shm tmpfs 197980432 9400 197971032 1% /run tmpfs 197980432 0 197980432 0% /sys/fs/cgroup /dev/sda1 248783 244685 0 100% /boot tmpfs 39596088 0 39596088 0% /run/user/0 /dev/sdi 781412184 […]
READ MORE »