aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2009-07-31 11:49:13 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-08-01 04:24:35 -0400
commit7e5f5fb09e6fc657f21816b5a18ba645a913368e (patch)
tree90a60c56f3bdc8f40969bda9d87eb3d31a066b8e
parent70dd5bf3b99964d52862ad2810c24cc32a553535 (diff)
block: Update topology documentation
Update topology comments and sysfs documentation based upon discussions with Neil Brown. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--Documentation/ABI/testing/sysfs-block37
-rw-r--r--block/blk-settings.c19
2 files changed, 36 insertions, 20 deletions
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block
index cbbd3e069945..5f3bedaf8e35 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -94,28 +94,37 @@ What: /sys/block/<disk>/queue/physical_block_size
94Date: May 2009 94Date: May 2009
95Contact: Martin K. Petersen <martin.petersen@oracle.com> 95Contact: Martin K. Petersen <martin.petersen@oracle.com>
96Description: 96Description:
97 This is the smallest unit the storage device can write 97 This is the smallest unit a physical storage device can
98 without resorting to read-modify-write operation. It is 98 write atomically. It is usually the same as the logical
99 usually the same as the logical block size but may be 99 block size but may be bigger. One example is SATA
100 bigger. One example is SATA drives with 4KB sectors 100 drives with 4KB sectors that expose a 512-byte logical
101 that expose a 512-byte logical block size to the 101 block size to the operating system. For stacked block
102 operating system. 102 devices the physical_block_size variable contains the
103 maximum physical_block_size of the component devices.
103 104
104What: /sys/block/<disk>/queue/minimum_io_size 105What: /sys/block/<disk>/queue/minimum_io_size
105Date: April 2009 106Date: April 2009
106Contact: Martin K. Petersen <martin.petersen@oracle.com> 107Contact: Martin K. Petersen <martin.petersen@oracle.com>
107Description: 108Description:
108 Storage devices may report a preferred minimum I/O size, 109 Storage devices may report a granularity or preferred
109 which is the smallest request the device can perform 110 minimum I/O size which is the smallest request the
110 without incurring a read-modify-write penalty. For disk 111 device can perform without incurring a performance
111 drives this is often the physical block size. For RAID 112 penalty. For disk drives this is often the physical
112 arrays it is often the stripe chunk size. 113 block size. For RAID arrays it is often the stripe
114 chunk size. A properly aligned multiple of
115 minimum_io_size is the preferred request size for
116 workloads where a high number of I/O operations is
117 desired.
113 118
114What: /sys/block/<disk>/queue/optimal_io_size 119What: /sys/block/<disk>/queue/optimal_io_size
115Date: April 2009 120Date: April 2009
116Contact: Martin K. Petersen <martin.petersen@oracle.com> 121Contact: Martin K. Petersen <martin.petersen@oracle.com>
117Description: 122Description:
118 Storage devices may report an optimal I/O size, which is 123 Storage devices may report an optimal I/O size, which is
119 the device's preferred unit of receiving I/O. This is 124 the device's preferred unit for sustained I/O. This is
120 rarely reported for disk drives. For RAID devices it is 125 rarely reported for disk drives. For RAID arrays it is
121 usually the stripe width or the internal block size. 126 usually the stripe width or the internal track size. A
127 properly aligned multiple of optimal_io_size is the
128 preferred request size for workloads where sustained
129 throughput is desired. If no optimal I/O size is
130 reported this file contains 0.
diff --git a/block/blk-settings.c b/block/blk-settings.c
index e1327ddfc13b..476d87065073 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -413,10 +413,13 @@ EXPORT_SYMBOL(blk_limits_io_min);
413 * @min: smallest I/O size in bytes 413 * @min: smallest I/O size in bytes
414 * 414 *
415 * Description: 415 * Description:
416 * Some devices have an internal block size bigger than the reported 416 * Storage devices may report a granularity or preferred minimum I/O
417 * hardware sector size. This function can be used to signal the 417 * size which is the smallest request the device can perform without
418 * smallest I/O the device can perform without incurring a performance 418 * incurring a performance penalty. For disk drives this is often the
419 * penalty. 419 * physical block size. For RAID arrays it is often the stripe chunk
420 * size. A properly aligned multiple of minimum_io_size is the
421 * preferred request size for workloads where a high number of I/O
422 * operations is desired.
420 */ 423 */
421void blk_queue_io_min(struct request_queue *q, unsigned int min) 424void blk_queue_io_min(struct request_queue *q, unsigned int min)
422{ 425{
@@ -430,8 +433,12 @@ EXPORT_SYMBOL(blk_queue_io_min);
430 * @opt: optimal request size in bytes 433 * @opt: optimal request size in bytes
431 * 434 *
432 * Description: 435 * Description:
433 * Drivers can call this function to set the preferred I/O request 436 * Storage devices may report an optimal I/O size, which is the
434 * size for devices that report such a value. 437 * device's preferred unit for sustained I/O. This is rarely reported
438 * for disk drives. For RAID arrays it is usually the stripe width or
439 * the internal track size. A properly aligned multiple of
440 * optimal_io_size is the preferred request size for workloads where
441 * sustained throughput is desired.
435 */ 442 */
436void blk_queue_io_opt(struct request_queue *q, unsigned int opt) 443void blk_queue_io_opt(struct request_queue *q, unsigned int opt)
437{ 444{