使用外部设备作为ext4 Journal创建方法 mke2fs -O journal_dev /dev/ram0 mke2fs -t ext4 -J device=/dev/ram0 /dev/mapper/vgdata-volume1
READ MORE »驱动加载报错“no symbol version for module_layout”解决办法
新编译的驱动,加载时报错“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 »