# tldr命令介绍 tldr tldr tldr Display simple help pages for command-line tools from the tldr-pages project.More information: https://tldr.sh.
- Print the tldr page for a specific command (hint: this is how you got here!): tldr {{command}}
- Print the tldr page for a specific subcommand: tldr {{command}}-{{subcommand}}
- Print the tldr page for a commandfor a specific [p]latform: tldr -p {{android|linux|osx|sunos|windows}} {{command}}
- [u]pdate the local cache of tldr pages: tldr -u
# fio介绍与命令示例 tldr fio fio Flexible I/O tester.Tool that will spawn a number of threads or processes doing a particular type of I/O action.More information: https://fio.readthedocs.io/en/latest/fio_doc.html.
- Test random reads: sudo fio --filename={{path/to/file}} --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=256 --runtime=120 --numjobs=4 --time_based --group_reporting --name={{job_name}} --eta-newline=1 --readonly
/* * We should not need to do this, but we're still using this to * ensure we can drain requests on a dying queue. */ if (unlikely(!test_bit(NVMEQ_ENABLED, &nvmeq->flags))) return BLK_STS_IOERR;
ret = nvme_setup_cmd(ns, req, &cmnd); if (ret) return ret;
if (blk_rq_nr_phys_segments(req)) { ret = nvme_map_data(dev, req, &cmnd); if (ret) goto out_free_cmd; }
make CONFIG_NVME_CORE=m CONFIG_BLK_DEV_NVME=m -C /root/kernel/linux-5.4 M=/root/kernel/linux-5.4/drivers/nvme/host modules make CONFIG_NVME_CORE=m CONFIG_BLK_DEV_NVME=m -C /root/kernel/linux-5.4 M=/root/kernel/linux-5.4/drivers/nvme/host clean
BASH
显示
1 2 3 4 5
make: Entering directory '/root/kernel/linux-5.4'
ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.
/** * blk_queue_max_hw_sectors - set max sectors for a request for this queue * @q: the request queue for the device * @max_hw_sectors: max hardware sectors in the usual 512b unit * * Description: * Enables a low level driver to set a hard upper limit, * max_hw_sectors, on the size of requests. max_hw_sectors is set by * the device driver based upon the capabilities of the I/O * controller. * * max_dev_sectors is a hard limit imposed by the storage device for * READ/WRITE requests. It is set by the disk driver. * * max_sectors is a soft limit imposed by the block layer for * filesystem type requests. This value can be overridden on a * per-device basis in /sys/block/<device>/queue/max_sectors_kb. * The soft limit can not exceed max_hw_sectors. **/ voidblk_queue_max_hw_sectors(struct request_queue *q, unsignedint max_hw_sectors) { structqueue_limits *limits = &q->limits; unsignedint max_sectors;
if ((max_hw_sectors << 9) < PAGE_SIZE) { max_hw_sectors = 1 << (PAGE_SHIFT - 9); printk(KERN_INFO "%s: set to minimum %d\n", __func__, max_hw_sectors); }