Commit 7e5f5fb0 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Jens Axboe

block: Update topology documentation

Update topology comments and sysfs documentation based upon discussions
with Neil Brown.
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 70dd5bf3
...@@ -94,28 +94,37 @@ What: /sys/block/<disk>/queue/physical_block_size ...@@ -94,28 +94,37 @@ What: /sys/block/<disk>/queue/physical_block_size
Date: May 2009 Date: May 2009
Contact: Martin K. Petersen <martin.petersen@oracle.com> Contact: Martin K. Petersen <martin.petersen@oracle.com>
Description: Description:
This is the smallest unit the storage device can write This is the smallest unit a physical storage device can
without resorting to read-modify-write operation. It is write atomically. It is usually the same as the logical
usually the same as the logical block size but may be block size but may be bigger. One example is SATA
bigger. One example is SATA drives with 4KB sectors drives with 4KB sectors that expose a 512-byte logical
that expose a 512-byte logical block size to the block size to the operating system. For stacked block
operating system. devices the physical_block_size variable contains the
maximum physical_block_size of the component devices.
What: /sys/block/<disk>/queue/minimum_io_size What: /sys/block/<disk>/queue/minimum_io_size
Date: April 2009 Date: April 2009
Contact: Martin K. Petersen <martin.petersen@oracle.com> Contact: Martin K. Petersen <martin.petersen@oracle.com>
Description: Description:
Storage devices may report a preferred minimum I/O size, Storage devices may report a granularity or preferred
which is the smallest request the device can perform minimum I/O size which is the smallest request the
without incurring a read-modify-write penalty. For disk device can perform without incurring a performance
drives this is often the physical block size. For RAID penalty. For disk drives this is often the physical
arrays it is often the stripe chunk size. block size. For RAID arrays it is often the stripe
chunk size. A properly aligned multiple of
minimum_io_size is the preferred request size for
workloads where a high number of I/O operations is
desired.
What: /sys/block/<disk>/queue/optimal_io_size What: /sys/block/<disk>/queue/optimal_io_size
Date: April 2009 Date: April 2009
Contact: Martin K. Petersen <martin.petersen@oracle.com> Contact: Martin K. Petersen <martin.petersen@oracle.com>
Description: Description:
Storage devices may report an optimal I/O size, which is Storage devices may report an optimal I/O size, which is
the device's preferred unit of receiving I/O. This is the device's preferred unit for sustained I/O. This is
rarely reported for disk drives. For RAID devices it is rarely reported for disk drives. For RAID arrays it is
usually the stripe width or the internal block size. usually the stripe width or the internal track size. A
properly aligned multiple of optimal_io_size is the
preferred request size for workloads where sustained
throughput is desired. If no optimal I/O size is
reported this file contains 0.
...@@ -413,10 +413,13 @@ EXPORT_SYMBOL(blk_limits_io_min); ...@@ -413,10 +413,13 @@ EXPORT_SYMBOL(blk_limits_io_min);
* @min: smallest I/O size in bytes * @min: smallest I/O size in bytes
* *
* Description: * Description:
* Some devices have an internal block size bigger than the reported * Storage devices may report a granularity or preferred minimum I/O
* hardware sector size. This function can be used to signal the * size which is the smallest request the device can perform without
* smallest I/O the device can perform without incurring a performance * incurring a performance penalty. For disk drives this is often the
* penalty. * physical block size. For RAID arrays it is often the stripe chunk
* size. A properly aligned multiple of minimum_io_size is the
* preferred request size for workloads where a high number of I/O
* operations is desired.
*/ */
void blk_queue_io_min(struct request_queue *q, unsigned int min) void blk_queue_io_min(struct request_queue *q, unsigned int min)
{ {
...@@ -430,8 +433,12 @@ EXPORT_SYMBOL(blk_queue_io_min); ...@@ -430,8 +433,12 @@ EXPORT_SYMBOL(blk_queue_io_min);
* @opt: optimal request size in bytes * @opt: optimal request size in bytes
* *
* Description: * Description:
* Drivers can call this function to set the preferred I/O request * Storage devices may report an optimal I/O size, which is the
* size for devices that report such a value. * device's preferred unit for sustained I/O. This is rarely reported
* for disk drives. For RAID arrays it is usually the stripe width or
* the internal track size. A properly aligned multiple of
* optimal_io_size is the preferred request size for workloads where
* sustained throughput is desired.
*/ */
void blk_queue_io_opt(struct request_queue *q, unsigned int opt) void blk_queue_io_opt(struct request_queue *q, unsigned int opt)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment