Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: block: convert to ReST

Rename the block documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

+542 -342
+4 -4
Documentation/admin-guide/kernel-parameters.txt
··· 430 430 431 431 blkdevparts= Manual partition parsing of block device(s) for 432 432 embedded devices based on command line input. 433 - See Documentation/block/cmdline-partition.txt 433 + See Documentation/block/cmdline-partition.rst 434 434 435 435 boot_delay= Milliseconds to delay each printk during boot. 436 436 Values larger than 10 seconds (10000) are changed to ··· 1199 1199 1200 1200 elevator= [IOSCHED] 1201 1201 Format: { "mq-deadline" | "kyber" | "bfq" } 1202 - See Documentation/block/deadline-iosched.txt, 1203 - Documentation/block/kyber-iosched.txt and 1204 - Documentation/block/bfq-iosched.txt for details. 1202 + See Documentation/block/deadline-iosched.rst, 1203 + Documentation/block/kyber-iosched.rst and 1204 + Documentation/block/bfq-iosched.rst for details. 1205 1205 1206 1206 elfcorehdr=[size[KMG]@]offset[KMG] [IA64,PPC,SH,X86,S390] 1207 1207 Specifies physical address of start of kernel core
+41 -27
Documentation/block/bfq-iosched.txt Documentation/block/bfq-iosched.rst
··· 1 + ========================== 1 2 BFQ (Budget Fair Queueing) 2 3 ========================== 3 4 4 5 BFQ is a proportional-share I/O scheduler, with some extra 5 6 low-latency capabilities. In addition to cgroups support (blkio or io 6 7 controllers), BFQ's main features are: 8 + 7 9 - BFQ guarantees a high system and application responsiveness, and a 8 10 low latency for time-sensitive applications, such as audio or video 9 11 players; ··· 57 55 58 56 BFQ works for multi-queue devices too. 59 57 60 - The table of contents follow. Impatients can just jump to Section 3. 58 + .. The table of contents follow. Impatients can just jump to Section 3. 61 59 62 - CONTENTS 60 + .. CONTENTS 63 61 64 - 1. When may BFQ be useful? 65 - 1-1 Personal systems 66 - 1-2 Server systems 67 - 2. How does BFQ work? 68 - 3. What are BFQ's tunables and how to properly configure BFQ? 69 - 4. BFQ group scheduling 70 - 4-1 Service guarantees provided 71 - 4-2 Interface 62 + 1. When may BFQ be useful? 63 + 1-1 Personal systems 64 + 1-2 Server systems 65 + 2. How does BFQ work? 66 + 3. What are BFQ's tunables and how to properly configure BFQ? 67 + 4. BFQ group scheduling 68 + 4-1 Service guarantees provided 69 + 4-2 Interface 72 70 73 71 1. When may BFQ be useful? 74 72 ========================== ··· 79 77 -------------------- 80 78 81 79 Low latency for interactive applications 80 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 82 81 83 82 Regardless of the actual background workload, BFQ guarantees that, for 84 83 interactive tasks, the storage device is virtually as responsive as if 85 84 it was idle. For example, even if one or more of the following 86 85 background workloads are being executed: 86 + 87 87 - one or more large files are being read, written or copied, 88 88 - a tree of source files is being compiled, 89 89 - one or more virtual machines are performing I/O, 90 90 - a software update is in progress, 91 91 - indexing daemons are scanning filesystems and updating their 92 92 databases, 93 + 93 94 starting an application or loading a file from within an application 94 95 takes about the same time as if the storage device was idle. As a 95 96 comparison, with CFQ, NOOP or DEADLINE, and in the same conditions, ··· 100 95 until the background workload terminates (also on SSDs). 101 96 102 97 Low latency for soft real-time applications 103 - 98 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 104 99 Also soft real-time applications, such as audio and video 105 100 players/streamers, enjoy a low latency and a low drop rate, regardless 106 101 of the background I/O workload. As a consequence, these applications 107 102 do not suffer from almost any glitch due to the background workload. 108 103 109 104 Higher speed for code-development tasks 105 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 110 106 111 107 If some additional workload happens to be executed in parallel, then 112 108 BFQ executes the I/O-related components of typical code-development ··· 115 109 NOOP or DEADLINE. 116 110 117 111 High throughput 112 + ^^^^^^^^^^^^^^^ 118 113 119 114 On hard disks, BFQ achieves up to 30% higher throughput than CFQ, and 120 115 up to 150% higher throughput than DEADLINE and NOOP, with all the ··· 124 117 instead, about the same throughput as the other schedulers. 125 118 126 119 Strong fairness, bandwidth and delay guarantees 120 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 127 121 128 122 BFQ distributes the device throughput, and not just the device time, 129 123 among I/O-bound applications in proportion their weights, with any ··· 141 133 properties as above. In particular, regardless of whether additional, 142 134 possibly heavy workloads are being served, BFQ guarantees: 143 135 144 - . audio and video-streaming with zero or very low jitter and drop 136 + * audio and video-streaming with zero or very low jitter and drop 145 137 rate; 146 138 147 - . fast retrieval of WEB pages and embedded objects; 139 + * fast retrieval of WEB pages and embedded objects; 148 140 149 - . real-time recording of data in live-dumping applications (e.g., 141 + * real-time recording of data in live-dumping applications (e.g., 150 142 packet logging); 151 143 152 - . responsiveness in local and remote access to a server. 144 + * responsiveness in local and remote access to a server. 153 145 154 146 155 147 2. How does BFQ work? ··· 159 151 plus a lot of code, are borrowed from CFQ. 160 152 161 153 - Each process doing I/O on a device is associated with a weight and a 162 - (bfq_)queue. 154 + `(bfq_)queue`. 163 155 164 156 - BFQ grants exclusive access to the device, for a while, to one queue 165 157 (process) at a time, and implements this service model by ··· 548 540 CONFIG_BFQ_CGROUP_DEBUG is set. If it is set, then bfq creates all 549 541 the stat files documented in 550 542 Documentation/cgroup-v1/blkio-controller.rst. If, instead, 551 - CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files 552 - blkio.bfq.io_service_bytes 553 - blkio.bfq.io_service_bytes_recursive 554 - blkio.bfq.io_serviced 555 - blkio.bfq.io_serviced_recursive 543 + CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files:: 544 + 545 + blkio.bfq.io_service_bytes 546 + blkio.bfq.io_service_bytes_recursive 547 + blkio.bfq.io_serviced 548 + blkio.bfq.io_serviced_recursive 556 549 557 550 The value of CONFIG_BFQ_CGROUP_DEBUG greatly influences the maximum 558 551 throughput sustainable with bfq, because updating the blkio.bfq.* ··· 576 567 applications. Unset this tunable if you need/want to control weights. 577 568 578 569 579 - [1] P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O 570 + [1] 571 + P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O 580 572 Scheduler", Proceedings of the First Workshop on Mobile System 581 573 Technologies (MST-2015), May 2015. 574 + 582 575 http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf 583 576 584 - [2] P. Valente and M. Andreolini, "Improving Application 577 + [2] 578 + P. Valente and M. Andreolini, "Improving Application 585 579 Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of 586 580 the 5th Annual International Systems and Storage Conference 587 581 (SYSTOR '12), June 2012. 588 - Slightly extended version: 589 - http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- 590 - results.pdf 591 582 592 - [3] https://github.com/Algodev-github/S 583 + Slightly extended version: 584 + 585 + http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite-results.pdf 586 + 587 + [3] 588 + https://github.com/Algodev-github/S
+211 -119
Documentation/block/biodoc.txt Documentation/block/biodoc.rst
··· 1 - Notes on the Generic Block Layer Rewrite in Linux 2.5 2 - ===================================================== 1 + ===================================================== 2 + Notes on the Generic Block Layer Rewrite in Linux 2.5 3 + ===================================================== 4 + 5 + .. note:: 6 + 7 + It seems that there are lot of outdated stuff here. This seems 8 + to be written somewhat as a task list. Yet, eventually, something 9 + here might still be useful. 3 10 4 11 Notes Written on Jan 15, 2002: 5 - Jens Axboe <jens.axboe@oracle.com> 6 - Suparna Bhattacharya <suparna@in.ibm.com> 12 + - Jens Axboe <jens.axboe@oracle.com> 13 + - Suparna Bhattacharya <suparna@in.ibm.com> 7 14 8 15 Last Updated May 2, 2002 9 - September 2003: Updated I/O Scheduler portions 10 - Nick Piggin <npiggin@kernel.dk> 11 16 12 - Introduction: 17 + September 2003: Updated I/O Scheduler portions 18 + - Nick Piggin <npiggin@kernel.dk> 19 + 20 + Introduction 21 + ============ 13 22 14 23 These are some notes describing some aspects of the 2.5 block layer in the 15 24 context of the bio rewrite. The idea is to bring out some of the key ··· 26 17 27 18 Please mail corrections & suggestions to suparna@in.ibm.com. 28 19 29 - Credits: 30 - --------- 20 + Credits 21 + ======= 31 22 32 23 2.5 bio rewrite: 33 - Jens Axboe <jens.axboe@oracle.com> 24 + - Jens Axboe <jens.axboe@oracle.com> 34 25 35 26 Many aspects of the generic block layer redesign were driven by and evolved 36 27 over discussions, prior patches and the collective experience of several ··· 38 29 39 30 The following people helped with review comments and inputs for this 40 31 document: 41 - Christoph Hellwig <hch@infradead.org> 42 - Arjan van de Ven <arjanv@redhat.com> 43 - Randy Dunlap <rdunlap@xenotime.net> 44 - Andre Hedrick <andre@linux-ide.org> 32 + 33 + - Christoph Hellwig <hch@infradead.org> 34 + - Arjan van de Ven <arjanv@redhat.com> 35 + - Randy Dunlap <rdunlap@xenotime.net> 36 + - Andre Hedrick <andre@linux-ide.org> 45 37 46 38 The following people helped with fixes/contributions to the bio patches 47 39 while it was still work-in-progress: 48 - David S. Miller <davem@redhat.com> 40 + 41 + - David S. Miller <davem@redhat.com> 49 42 50 43 51 - Description of Contents: 52 - ------------------------ 44 + .. Description of Contents: 53 45 54 - 1. Scope for tuning of logic to various needs 55 - 1.1 Tuning based on device or low level driver capabilities 46 + 1. Scope for tuning of logic to various needs 47 + 1.1 Tuning based on device or low level driver capabilities 56 48 - Per-queue parameters 57 49 - Highmem I/O support 58 50 - I/O scheduler modularization 59 - 1.2 Tuning based on high level requirements/capabilities 51 + 1.2 Tuning based on high level requirements/capabilities 60 52 1.2.1 Request Priority/Latency 61 - 1.3 Direct access/bypass to lower layers for diagnostics and special 62 - device operations 53 + 1.3 Direct access/bypass to lower layers for diagnostics and special 54 + device operations 63 55 1.3.1 Pre-built commands 64 - 2. New flexible and generic but minimalist i/o structure or descriptor 65 - (instead of using buffer heads at the i/o layer) 66 - 2.1 Requirements/Goals addressed 67 - 2.2 The bio struct in detail (multi-page io unit) 68 - 2.3 Changes in the request structure 69 - 3. Using bios 70 - 3.1 Setup/teardown (allocation, splitting) 71 - 3.2 Generic bio helper routines 72 - 3.2.1 Traversing segments and completion units in a request 73 - 3.2.2 Setting up DMA scatterlists 74 - 3.2.3 I/O completion 75 - 3.2.4 Implications for drivers that do not interpret bios (don't handle 76 - multiple segments) 77 - 3.3 I/O submission 78 - 4. The I/O scheduler 79 - 5. Scalability related changes 80 - 5.1 Granular locking: Removal of io_request_lock 81 - 5.2 Prepare for transition to 64 bit sector_t 82 - 6. Other Changes/Implications 83 - 6.1 Partition re-mapping handled by the generic block layer 84 - 7. A few tips on migration of older drivers 85 - 8. A list of prior/related/impacted patches/ideas 86 - 9. Other References/Discussion Threads 56 + 2. New flexible and generic but minimalist i/o structure or descriptor 57 + (instead of using buffer heads at the i/o layer) 58 + 2.1 Requirements/Goals addressed 59 + 2.2 The bio struct in detail (multi-page io unit) 60 + 2.3 Changes in the request structure 61 + 3. Using bios 62 + 3.1 Setup/teardown (allocation, splitting) 63 + 3.2 Generic bio helper routines 64 + 3.2.1 Traversing segments and completion units in a request 65 + 3.2.2 Setting up DMA scatterlists 66 + 3.2.3 I/O completion 67 + 3.2.4 Implications for drivers that do not interpret bios (don't handle 68 + multiple segments) 69 + 3.3 I/O submission 70 + 4. The I/O scheduler 71 + 5. Scalability related changes 72 + 5.1 Granular locking: Removal of io_request_lock 73 + 5.2 Prepare for transition to 64 bit sector_t 74 + 6. Other Changes/Implications 75 + 6.1 Partition re-mapping handled by the generic block layer 76 + 7. A few tips on migration of older drivers 77 + 8. A list of prior/related/impacted patches/ideas 78 + 9. Other References/Discussion Threads 87 79 88 - --------------------------------------------------------------------------- 89 80 90 81 Bio Notes 91 - -------- 82 + ========= 92 83 93 84 Let us discuss the changes in the context of how some overall goals for the 94 85 block layer are addressed. 95 86 96 87 1. Scope for tuning the generic logic to satisfy various requirements 88 + ===================================================================== 97 89 98 90 The block layer design supports adaptable abstractions to handle common 99 91 processing with the ability to tune the logic to an appropriate extent ··· 107 97 capabilities. 108 98 109 99 1.1 Tuning based on low level device / driver capabilities 100 + ---------------------------------------------------------- 110 101 111 102 Sophisticated devices with large built-in caches, intelligent i/o scheduling 112 103 optimizations, high memory DMA support, etc may find some of the ··· 144 133 Sets two variables that limit the size of the request. 145 134 146 135 - The request queue's max_sectors, which is a soft size in 147 - units of 512 byte sectors, and could be dynamically varied 148 - by the core kernel. 136 + units of 512 byte sectors, and could be dynamically varied 137 + by the core kernel. 149 138 150 139 - The request queue's max_hw_sectors, which is a hard limit 151 - and reflects the maximum size request a driver can handle 152 - in units of 512 byte sectors. 140 + and reflects the maximum size request a driver can handle 141 + in units of 512 byte sectors. 153 142 154 143 The default for both max_sectors and max_hw_sectors is 155 144 255. The upper limit of max_sectors is 1024. ··· 245 234 See section 4. The I/O scheduler for details. 246 235 247 236 1.2 Tuning Based on High level code capabilities 237 + ------------------------------------------------ 248 238 249 239 i. Application capabilities for raw i/o 250 240 ··· 270 258 other upper level mechanism to communicate such settings to block. 271 259 272 260 1.2.1 Request Priority/Latency 261 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 273 262 274 - Todo/Under discussion: 275 - Arjan's proposed request priority scheme allows higher levels some broad 263 + Todo/Under discussion:: 264 + 265 + Arjan's proposed request priority scheme allows higher levels some broad 276 266 control (high/med/low) over the priority of an i/o request vs other pending 277 267 requests in the queue. For example it allows reads for bringing in an 278 268 executable page on demand to be given a higher priority over pending write ··· 286 272 287 273 288 274 1.3 Direct Access to Low level Device/Driver Capabilities (Bypass mode) 289 - (e.g Diagnostics, Systems Management) 275 + ----------------------------------------------------------------------- 276 + 277 + (e.g Diagnostics, Systems Management) 290 278 291 279 There are situations where high-level code needs to have direct access to 292 280 the low level device capabilities or requires the ability to issue commands ··· 324 308 request->buffer, request->sector and request->nr_sectors or 325 309 request->current_nr_sectors fields itself rather than using the block layer 326 310 end_request or end_that_request_first completion interfaces. 327 - (See 2.3 or Documentation/block/request.txt for a brief explanation of 311 + (See 2.3 or Documentation/block/request.rst for a brief explanation of 328 312 the request structure fields) 329 313 330 - [TBD: end_that_request_last should be usable even in this case; 331 - Perhaps an end_that_direct_request_first routine could be implemented to make 332 - handling direct requests easier for such drivers; Also for drivers that 333 - expect bios, a helper function could be provided for setting up a bio 334 - corresponding to a data buffer] 314 + :: 335 315 336 - <JENS: I dont understand the above, why is end_that_request_first() not 337 - usable? Or _last for that matter. I must be missing something> 338 - <SUP: What I meant here was that if the request doesn't have a bio, then 339 - end_that_request_first doesn't modify nr_sectors or current_nr_sectors, 340 - and hence can't be used for advancing request state settings on the 341 - completion of partial transfers. The driver has to modify these fields 342 - directly by hand. 343 - This is because end_that_request_first only iterates over the bio list, 344 - and always returns 0 if there are none associated with the request. 345 - _last works OK in this case, and is not a problem, as I mentioned earlier 346 - > 316 + [TBD: end_that_request_last should be usable even in this case; 317 + Perhaps an end_that_direct_request_first routine could be implemented to make 318 + handling direct requests easier for such drivers; Also for drivers that 319 + expect bios, a helper function could be provided for setting up a bio 320 + corresponding to a data buffer] 321 + 322 + <JENS: I dont understand the above, why is end_that_request_first() not 323 + usable? Or _last for that matter. I must be missing something> 324 + 325 + <SUP: What I meant here was that if the request doesn't have a bio, then 326 + end_that_request_first doesn't modify nr_sectors or current_nr_sectors, 327 + and hence can't be used for advancing request state settings on the 328 + completion of partial transfers. The driver has to modify these fields 329 + directly by hand. 330 + This is because end_that_request_first only iterates over the bio list, 331 + and always returns 0 if there are none associated with the request. 332 + _last works OK in this case, and is not a problem, as I mentioned earlier 333 + > 347 334 348 335 1.3.1 Pre-built Commands 336 + ^^^^^^^^^^^^^^^^^^^^^^^^ 349 337 350 338 A request can be created with a pre-built custom command to be sent directly 351 339 to the device. The cmd block in the request structure has room for filling ··· 380 360 the pre-builder hook can be invoked there. 381 361 382 362 383 - 2. Flexible and generic but minimalist i/o structure/descriptor. 363 + 2. Flexible and generic but minimalist i/o structure/descriptor 364 + =============================================================== 384 365 385 366 2.1 Reason for a new structure and requirements addressed 367 + --------------------------------------------------------- 386 368 387 369 Prior to 2.5, buffer heads were used as the unit of i/o at the generic block 388 370 layer, and the low level request structure was associated with a chain of ··· 400 378 The following were some of the goals and expectations considered in the 401 379 redesign of the block i/o data structure in 2.5. 402 380 403 - i. Should be appropriate as a descriptor for both raw and buffered i/o - 381 + 1. Should be appropriate as a descriptor for both raw and buffered i/o - 404 382 avoid cache related fields which are irrelevant in the direct/page i/o path, 405 383 or filesystem block size alignment restrictions which may not be relevant 406 384 for raw i/o. 407 - ii. Ability to represent high-memory buffers (which do not have a virtual 385 + 2. Ability to represent high-memory buffers (which do not have a virtual 408 386 address mapping in kernel address space). 409 - iii.Ability to represent large i/os w/o unnecessarily breaking them up (i.e 387 + 3. Ability to represent large i/os w/o unnecessarily breaking them up (i.e 410 388 greater than PAGE_SIZE chunks in one shot) 411 - iv. At the same time, ability to retain independent identity of i/os from 389 + 4. At the same time, ability to retain independent identity of i/os from 412 390 different sources or i/o units requiring individual completion (e.g. for 413 391 latency reasons) 414 - v. Ability to represent an i/o involving multiple physical memory segments 392 + 5. Ability to represent an i/o involving multiple physical memory segments 415 393 (including non-page aligned page fragments, as specified via readv/writev) 416 394 without unnecessarily breaking it up, if the underlying device is capable of 417 395 handling it. 418 - vi. Preferably should be based on a memory descriptor structure that can be 396 + 6. Preferably should be based on a memory descriptor structure that can be 419 397 passed around different types of subsystems or layers, maybe even 420 398 networking, without duplication or extra copies of data/descriptor fields 421 399 themselves in the process 422 - vii.Ability to handle the possibility of splits/merges as the structure passes 400 + 7. Ability to handle the possibility of splits/merges as the structure passes 423 401 through layered drivers (lvm, md, evms), with minimal overhead. 424 402 425 403 The solution was to define a new structure (bio) for the block layer, ··· 430 408 mapped to bio structures. 431 409 432 410 2.2 The bio struct 411 + ------------------ 433 412 434 413 The bio structure uses a vector representation pointing to an array of tuples 435 414 of <page, offset, len> to describe the i/o buffer, and has various other ··· 440 417 Notice that this representation means that a bio has no virtual address 441 418 mapping at all (unlike buffer heads). 442 419 443 - struct bio_vec { 420 + :: 421 + 422 + struct bio_vec { 444 423 struct page *bv_page; 445 424 unsigned short bv_len; 446 425 unsigned short bv_offset; 447 - }; 426 + }; 448 427 449 - /* 450 - * main unit of I/O for the block layer and lower layers (ie drivers) 451 - */ 452 - struct bio { 428 + /* 429 + * main unit of I/O for the block layer and lower layers (ie drivers) 430 + */ 431 + struct bio { 453 432 struct bio *bi_next; /* request queue link */ 454 433 struct block_device *bi_bdev; /* target device */ 455 434 unsigned long bi_flags; /* status, command, etc */ ··· 468 443 bio_end_io_t *bi_end_io; /* bi_end_io (bio) */ 469 444 atomic_t bi_cnt; /* pin count: free when it hits zero */ 470 445 void *bi_private; 471 - }; 446 + }; 472 447 473 448 With this multipage bio design: 474 449 ··· 478 453 - Splitting of an i/o request across multiple devices (as in the case of 479 454 lvm or raid) is achieved by cloning the bio (where the clone points to 480 455 the same bi_io_vec array, but with the index and size accordingly modified) 481 - - A linked list of bios is used as before for unrelated merges (*) - this 456 + - A linked list of bios is used as before for unrelated merges [*]_ - this 482 457 avoids reallocs and makes independent completions easier to handle. 483 458 - Code that traverses the req list can find all the segments of a bio 484 459 by using rq_for_each_segment. This handles the fact that a request ··· 487 462 field to keep track of the next bio_vec entry to process. 488 463 (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE) 489 464 [TBD: Should preferably also have a bi_voffset and bi_vlen to avoid modifying 490 - bi_offset an len fields] 465 + bi_offset an len fields] 491 466 492 - (*) unrelated merges -- a request ends up containing two or more bios that 493 - didn't originate from the same place. 467 + .. [*] 468 + 469 + unrelated merges -- a request ends up containing two or more bios that 470 + didn't originate from the same place. 494 471 495 472 bi_end_io() i/o callback gets called on i/o completion of the entire bio. 496 473 ··· 510 483 right now). The intent however is to enable clustering of pages etc to 511 484 become possible. The pagebuf abstraction layer from SGI also uses multi-page 512 485 bios, but that is currently not included in the stock development kernels. 513 - The same is true of Andrew Morton's work-in-progress multipage bio writeout 486 + The same is true of Andrew Morton's work-in-progress multipage bio writeout 514 487 and readahead patches. 515 488 516 489 2.3 Changes in the Request Structure 490 + ------------------------------------ 517 491 518 492 The request structure is the structure that gets passed down to low level 519 493 drivers. The block layer make_request function builds up a request structure, ··· 527 499 Only some relevant fields (mainly those which changed or may be referred 528 500 to in some of the discussion here) are listed below, not necessarily in 529 501 the order in which they occur in the structure (see include/linux/blkdev.h) 530 - Refer to Documentation/block/request.txt for details about all the request 502 + Refer to Documentation/block/request.rst for details about all the request 531 503 structure fields and a quick reference about the layers which are 532 - supposed to use or modify those fields. 504 + supposed to use or modify those fields:: 533 505 534 - struct request { 506 + struct request { 535 507 struct list_head queuelist; /* Not meant to be directly accessed by 536 508 the driver. 537 509 Used by q->elv_next_request_fn ··· 576 548 . 577 549 struct bio *bio, *biotail; /* bio list instead of bh */ 578 550 struct request_list *rl; 579 - } 580 - 551 + } 552 + 581 553 See the req_ops and req_flag_bits definitions for an explanation of the various 582 554 flags available. Some bits are used by the block layer or i/o scheduler. 583 - 555 + 584 556 The behaviour of the various sector counts are almost the same as before, 585 557 except that since we have multi-segment bios, current_nr_sectors refers 586 558 to the numbers of sectors in the current segment being processed which could ··· 606 578 functions which the driver uses. (Section 1.3) 607 579 608 580 3. Using bios 581 + ============= 609 582 610 583 3.1 Setup/Teardown 584 + ------------------ 611 585 612 586 There are routines for managing the allocation, and reference counting, and 613 587 freeing of bios (bio_alloc, bio_get, bio_put). ··· 636 606 The caller of bio_alloc is expected to taken certain steps to avoid 637 607 deadlocks, e.g. avoid trying to allocate more memory from the pool while 638 608 already holding memory obtained from the pool. 639 - [TBD: This is a potential issue, though a rare possibility 640 - in the bounce bio allocation that happens in the current code, since 641 - it ends up allocating a second bio from the same pool while 642 - holding the original bio ] 609 + 610 + :: 611 + 612 + [TBD: This is a potential issue, though a rare possibility 613 + in the bounce bio allocation that happens in the current code, since 614 + it ends up allocating a second bio from the same pool while 615 + holding the original bio ] 643 616 644 617 Memory allocated from the pool should be released back within a limited 645 618 amount of time (in the case of bio, that would be after the i/o is completed). ··· 668 635 in lvm or md. 669 636 670 637 3.2 Generic bio helper Routines 638 + ------------------------------- 671 639 672 640 3.2.1 Traversing segments and completion units in a request 641 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 673 642 674 643 The macro rq_for_each_segment() should be used for traversing the bios 675 644 in the request list (drivers should avoid directly trying to do it 676 645 themselves). Using these helpers should also make it easier to cope 677 646 with block changes in the future. 647 + 648 + :: 678 649 679 650 struct req_iterator iter; 680 651 rq_for_each_segment(bio_vec, rq, iter) ··· 690 653 need to be reorganized to support multi-segment bios. 691 654 692 655 3.2.2 Setting up DMA scatterlists 656 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 693 657 694 658 The blk_rq_map_sg() helper routine would be used for setting up scatter 695 659 gather lists from a request, so a driver need not do it on its own. ··· 721 683 a driver could handle) 722 684 723 685 3.2.3 I/O completion 686 + ^^^^^^^^^^^^^^^^^^^^ 724 687 725 688 The existing generic block layer helper routines end_request, 726 689 end_that_request_first and end_that_request_last can be used for i/o ··· 730 691 bio support, end_that_request_first requires an additional argument indicating 731 692 the number of sectors completed. 732 693 733 - 3.2.4 Implications for drivers that do not interpret bios (don't handle 734 - multiple segments) 694 + 3.2.4 Implications for drivers that do not interpret bios 695 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 696 + 697 + (don't handle multiple segments) 735 698 736 699 Drivers that do not interpret bios e.g those which do not handle multiple 737 700 segments and do not support i/o into high memory addresses (require bounce ··· 748 707 direct access requests which only specify rq->buffer without a valid rq->bio) 749 708 750 709 3.3 I/O Submission 710 + ------------------ 751 711 752 712 The routine submit_bio() is used to submit a single io. Higher level i/o 753 713 routines make use of this: 754 714 755 715 (a) Buffered i/o: 716 + 756 717 The routine submit_bh() invokes submit_bio() on a bio corresponding to the 757 718 bh, allocating the bio if required. ll_rw_block() uses submit_bh() as before. 758 719 759 720 (b) Kiobuf i/o (for raw/direct i/o): 721 + 760 722 The ll_rw_kio() routine breaks up the kiobuf into page sized chunks and 761 723 maps the array to one or more multi-page bios, issuing submit_bio() to 762 724 perform the i/o on each of these. ··· 782 738 783 739 784 740 (c) Page i/o: 741 + 785 742 Todo/Under discussion: 786 743 787 744 Andrew Morton's multi-page bio patches attempt to issue multi-page ··· 798 753 abstraction, but intended to be as lightweight as possible). 799 754 800 755 (d) Direct access i/o: 756 + 801 757 Direct access requests that do not contain bios would be submitted differently 802 758 as discussed earlier in section 1.3. 803 759 ··· 826 780 827 781 828 782 4. The I/O scheduler 783 + ==================== 784 + 829 785 I/O scheduler, a.k.a. elevator, is implemented in two layers. Generic dispatch 830 786 queue and specific I/O schedulers. Unless stated otherwise, elevator is used 831 787 to refer to both parts and I/O scheduler to specific I/O schedulers. 832 788 833 - Block layer implements generic dispatch queue in block/*.c. 789 + Block layer implements generic dispatch queue in `block/*.c`. 834 790 The generic dispatch queue is responsible for requeueing, handling non-fs 835 791 requests and all other subtleties. 836 792 ··· 850 802 keeping work. 851 803 852 804 4.1. I/O scheduler API 805 + ---------------------- 853 806 854 807 The functions an elevator may implement are: (* are mandatory) 808 + 809 + =============================== ================================================ 855 810 elevator_merge_fn called to query requests for merge with a bio 856 811 857 812 elevator_merge_req_fn called when two requests get merged. the one ··· 913 862 elevator_init_fn* 914 863 elevator_exit_fn Allocate and free any elevator specific storage 915 864 for a queue. 865 + =============================== ================================================ 916 866 917 867 4.2 Request flows seen by I/O schedulers 868 + ---------------------------------------- 869 + 918 870 All requests seen by I/O schedulers strictly follow one of the following three 919 871 flows. 920 872 ··· 931 877 -> put_req_fn 932 878 933 879 4.3 I/O scheduler implementation 880 + -------------------------------- 881 + 934 882 The generic i/o scheduler algorithm attempts to sort/merge/batch requests for 935 883 optimal disk scan and request servicing performance (based on generic 936 884 principles and device capabilities), optimized for: 885 + 937 886 i. improved throughput 938 887 ii. improved latency 939 888 iii. better utilization of h/w & CPU time ··· 990 933 a big request from the broken up pieces coming by. 991 934 992 935 4.4 I/O contexts 936 + ---------------- 937 + 993 938 I/O contexts provide a dynamically allocated per process data area. They may 994 939 be used in I/O schedulers, and in the block layer (could be used for IO statis, 995 - priorities for example). See *io_context in block/ll_rw_blk.c, and as-iosched.c 940 + priorities for example). See `*io_context` in block/ll_rw_blk.c, and as-iosched.c 996 941 for an example of usage in an i/o scheduler. 997 942 998 943 999 944 5. Scalability related changes 945 + ============================== 1000 946 1001 947 5.1 Granular Locking: io_request_lock replaced by a per-queue lock 948 + ------------------------------------------------------------------ 1002 949 1003 950 The global io_request_lock has been removed as of 2.5, to avoid 1004 951 the scalability bottleneck it was causing, and has been replaced by more ··· 1017 956 should still be SMP safe. Drivers are free to drop the queue 1018 957 lock themselves, if required. Drivers that explicitly used the 1019 958 io_request_lock for serialization need to be modified accordingly. 1020 - Usually it's as easy as adding a global lock: 959 + Usually it's as easy as adding a global lock:: 1021 960 1022 961 static DEFINE_SPINLOCK(my_driver_lock); 1023 962 1024 963 and passing the address to that lock to blk_init_queue(). 1025 964 1026 965 5.2 64 bit sector numbers (sector_t prepares for 64 bit support) 966 + ---------------------------------------------------------------- 1027 967 1028 968 The sector number used in the bio structure has been changed to sector_t, 1029 969 which could be defined as 64 bit in preparation for 64 bit sector support. 1030 970 1031 971 6. Other Changes/Implications 972 + ============================= 1032 973 1033 974 6.1 Partition re-mapping handled by the generic block layer 975 + ----------------------------------------------------------- 1034 976 1035 977 In 2.5 some of the gendisk/partition related code has been reorganized. 1036 978 Now the generic block layer performs partition-remapping early and thus ··· 1048 984 1049 985 1050 986 7. A Few Tips on Migration of older drivers 987 + =========================================== 1051 988 1052 989 Old-style drivers that just use CURRENT and ignores clustered requests, 1053 990 may not need much change. The generic layer will automatically handle ··· 1082 1017 1083 1018 Drivers no longer have to map a {partition, sector offset} into the 1084 1019 correct absolute location anymore, this is done by the block layer, so 1085 - where a driver received a request ala this before: 1020 + where a driver received a request ala this before:: 1086 1021 1087 1022 rq->rq_dev = mk_kdev(3, 5); /* /dev/hda5 */ 1088 1023 rq->sector = 0; /* first sector on hda5 */ 1089 1024 1090 - it will now see 1025 + it will now see:: 1091 1026 1092 1027 rq->rq_dev = mk_kdev(3, 0); /* /dev/hda */ 1093 1028 rq->sector = 123128; /* offset from start of disk */ ··· 1104 1039 1105 1040 1106 1041 8. Prior/Related/Impacted patches 1042 + ================================= 1107 1043 1108 1044 8.1. Earlier kiobuf patches (sct/axboe/chait/hch/mkp) 1045 + ----------------------------------------------------- 1046 + 1109 1047 - orig kiobuf & raw i/o patches (now in 2.4 tree) 1110 1048 - direct kiobuf based i/o to devices (no intermediate bh's) 1111 1049 - page i/o using kiobuf 1112 1050 - kiobuf splitting for lvm (mkp) 1113 1051 - elevator support for kiobuf request merging (axboe) 1052 + 1114 1053 8.2. Zero-copy networking (Dave Miller) 1054 + --------------------------------------- 1055 + 1115 1056 8.3. SGI XFS - pagebuf patches - use of kiobufs 1057 + ----------------------------------------------- 1116 1058 8.4. Multi-page pioent patch for bio (Christoph Hellwig) 1059 + -------------------------------------------------------- 1117 1060 8.5. Direct i/o implementation (Andrea Arcangeli) since 2.4.10-pre11 1061 + -------------------------------------------------------------------- 1118 1062 8.6. Async i/o implementation patch (Ben LaHaise) 1063 + ------------------------------------------------- 1119 1064 8.7. EVMS layering design (IBM EVMS team) 1120 - 8.8. Larger page cache size patch (Ben LaHaise) and 1121 - Large page size (Daniel Phillips) 1065 + ----------------------------------------- 1066 + 8.8. Larger page cache size patch (Ben LaHaise) and Large page size (Daniel Phillips) 1067 + ------------------------------------------------------------------------------------- 1068 + 1122 1069 => larger contiguous physical memory buffers 1070 + 1123 1071 8.9. VM reservations patch (Ben LaHaise) 1072 + ---------------------------------------- 1124 1073 8.10. Write clustering patches ? (Marcelo/Quintela/Riel ?) 1074 + ---------------------------------------------------------- 1125 1075 8.11. Block device in page cache patch (Andrea Archangeli) - now in 2.4.10+ 1126 - 8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar, 1127 - Badari) 1076 + --------------------------------------------------------------------------- 1077 + 8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar, Badari) 1078 + ------------------------------------------------------------------------------- 1128 1079 8.13 Priority based i/o scheduler - prepatches (Arjan van de Ven) 1080 + ------------------------------------------------------------------ 1129 1081 8.14 IDE Taskfile i/o patch (Andre Hedrick) 1082 + -------------------------------------------- 1130 1083 8.15 Multi-page writeout and readahead patches (Andrew Morton) 1084 + --------------------------------------------------------------- 1131 1085 8.16 Direct i/o patches for 2.5 using kvec and bio (Badari Pulavarthy) 1086 + ----------------------------------------------------------------------- 1132 1087 1133 - 9. Other References: 1088 + 9. Other References 1089 + =================== 1134 1090 1135 - 9.1 The Splice I/O Model - Larry McVoy (and subsequent discussions on lkml, 1136 - and Linus' comments - Jan 2001) 1137 - 9.2 Discussions about kiobuf and bh design on lkml between sct, linus, alan 1138 - et al - Feb-March 2001 (many of the initial thoughts that led to bio were 1139 - brought up in this discussion thread) 1091 + 9.1 The Splice I/O Model 1092 + ------------------------ 1093 + 1094 + Larry McVoy (and subsequent discussions on lkml, and Linus' comments - Jan 2001 1095 + 1096 + 9.2 Discussions about kiobuf and bh design 1097 + ------------------------------------------ 1098 + 1099 + On lkml between sct, linus, alan et al - Feb-March 2001 (many of the 1100 + initial thoughts that led to bio were brought up in this discussion thread) 1101 + 1140 1102 9.3 Discussions on mempool on lkml - Dec 2001. 1141 - 1103 + ----------------------------------------------
+11 -9
Documentation/block/biovecs.txt Documentation/block/biovecs.rst
··· 1 - 2 - Immutable biovecs and biovec iterators: 3 - ======================================= 1 + ====================================== 2 + Immutable biovecs and biovec iterators 3 + ====================================== 4 4 5 5 Kent Overstreet <kmo@daterainc.com> 6 6 ··· 121 121 Usage of helpers: 122 122 ================= 123 123 124 - * The following helpers whose names have the suffix of "_all" can only be used 125 - on non-BIO_CLONED bio. They are usually used by filesystem code. Drivers 126 - shouldn't use them because the bio may have been split before it reached the 127 - driver. 124 + * The following helpers whose names have the suffix of `_all` can only be used 125 + on non-BIO_CLONED bio. They are usually used by filesystem code. Drivers 126 + shouldn't use them because the bio may have been split before it reached the 127 + driver. 128 + 129 + :: 128 130 129 131 bio_for_each_segment_all() 130 132 bio_first_bvec_all() ··· 134 132 bio_last_bvec_all() 135 133 136 134 * The following helpers iterate over single-page segment. The passed 'struct 137 - bio_vec' will contain a single-page IO vector during the iteration 135 + bio_vec' will contain a single-page IO vector during the iteration:: 138 136 139 137 bio_for_each_segment() 140 138 bio_for_each_segment_all() 141 139 142 140 * The following helpers iterate over multi-page bvec. The passed 'struct 143 - bio_vec' will contain a multi-page IO vector during the iteration 141 + bio_vec' will contain a multi-page IO vector during the iteration:: 144 142 145 143 bio_for_each_bvec() 146 144 rq_for_each_bvec()
+18
Documentation/block/capability.rst
··· 1 + =============================== 2 + Generic Block Device Capability 3 + =============================== 4 + 5 + This file documents the sysfs file block/<disk>/capability 6 + 7 + capability is a hex word indicating which capabilities a specific disk 8 + supports. For more information on bits not listed here, see 9 + include/linux/genhd.h 10 + 11 + GENHD_FL_MEDIA_CHANGE_NOTIFY 12 + ---------------------------- 13 + 14 + Value: 4 15 + 16 + When this bit is set, the disk supports Asynchronous Notification 17 + of media change events. These events will be broadcast to user 18 + space via kernel uevent.
-15
Documentation/block/capability.txt
··· 1 - Generic Block Device Capability 2 - =============================================================================== 3 - This file documents the sysfs file block/<disk>/capability 4 - 5 - capability is a hex word indicating which capabilities a specific disk 6 - supports. For more information on bits not listed here, see 7 - include/linux/genhd.h 8 - 9 - Capability Value 10 - ------------------------------------------------------------------------------- 11 - GENHD_FL_MEDIA_CHANGE_NOTIFY 4 12 - When this bit is set, the disk supports Asynchronous Notification 13 - of media change events. These events will be broadcast to user 14 - space via kernel uevent. 15 -
+10 -3
Documentation/block/cmdline-partition.txt Documentation/block/cmdline-partition.rst
··· 1 + ============================================== 1 2 Embedded device command line partition parsing 2 - ===================================================================== 3 + ============================================== 3 4 4 5 The "blkdevparts" command line option adds support for reading the 5 6 block device partition table from the kernel command line. ··· 23 22 <size> 24 23 partition size, in bytes, such as: 512, 1m, 1G. 25 24 size may contain an optional suffix of (upper or lower case): 25 + 26 26 K, M, G, T, P, E. 27 + 27 28 "-" is used to denote all remaining space. 28 29 29 30 <offset> 30 31 partition start address, in bytes. 31 32 offset may contain an optional suffix of (upper or lower case): 33 + 32 34 K, M, G, T, P, E. 33 35 34 36 (part-name) ··· 40 36 User space application can access partition by partition name. 41 37 42 38 Example: 39 + 43 40 eMMC disk names are "mmcblk0" and "mmcblk0boot0". 44 41 45 - bootargs: 42 + bootargs:: 43 + 46 44 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)' 47 45 48 - dmesg: 46 + dmesg:: 47 + 49 48 mmcblk0: p1(data0) p2(data1) p3() 50 49 mmcblk0boot0: p1(boot) p2(kernel)
+35 -25
Documentation/block/data-integrity.txt Documentation/block/data-integrity.rst
··· 1 - ---------------------------------------------------------------------- 2 - 1. INTRODUCTION 1 + ============== 2 + Data Integrity 3 + ============== 4 + 5 + 1. Introduction 6 + =============== 3 7 4 8 Modern filesystems feature checksumming of data and metadata to 5 9 protect against data corruption. However, the detection of the ··· 32 28 allows not only corruption prevention but also isolation of the point 33 29 of failure. 34 30 35 - ---------------------------------------------------------------------- 36 - 2. THE DATA INTEGRITY EXTENSIONS 31 + 2. The Data Integrity Extensions 32 + ================================ 37 33 38 34 As written, the protocol extensions only protect the path between 39 35 controller and storage device. However, many controllers actually ··· 79 75 bodies (T10, T13), Oracle and its partners are trying to standardize 80 76 them within the Storage Networking Industry Association. 81 77 82 - ---------------------------------------------------------------------- 83 - 3. KERNEL CHANGES 78 + 3. Kernel Changes 79 + ================= 84 80 85 81 The data integrity framework in Linux enables protection information 86 82 to be pinned to I/Os and sent to/received from controllers that ··· 127 123 interface for this is being worked on. 128 124 129 125 130 - ---------------------------------------------------------------------- 131 - 4. BLOCK LAYER IMPLEMENTATION DETAILS 126 + 4. Block Layer Implementation Details 127 + ===================================== 132 128 133 - 4.1 BIO 129 + 4.1 Bio 130 + ------- 134 131 135 132 The data integrity patches add a new field to struct bio when 136 133 CONFIG_BLK_DEV_INTEGRITY is enabled. bio_integrity(bio) returns a ··· 150 145 bio_free() will automatically free the bip. 151 146 152 147 153 - 4.2 BLOCK DEVICE 148 + 4.2 Block Device 149 + ---------------- 154 150 155 151 Because the format of the protection data is tied to the physical 156 152 disk, each block device has been extended with a block integrity ··· 169 163 will require extra work due to the application tag. 170 164 171 165 172 - ---------------------------------------------------------------------- 173 - 5.0 BLOCK LAYER INTEGRITY API 166 + 5.0 Block Layer Integrity API 167 + ============================= 174 168 175 - 5.1 NORMAL FILESYSTEM 169 + 5.1 Normal Filesystem 170 + --------------------- 176 171 177 172 The normal filesystem is unaware that the underlying block device 178 173 is capable of sending/receiving integrity metadata. The IMD will ··· 181 174 in case of a WRITE. A READ request will cause the I/O integrity 182 175 to be verified upon completion. 183 176 184 - IMD generation and verification can be toggled using the 177 + IMD generation and verification can be toggled using the:: 185 178 186 179 /sys/block/<bdev>/integrity/write_generate 187 180 188 - and 181 + and:: 189 182 190 183 /sys/block/<bdev>/integrity/read_verify 191 184 192 185 flags. 193 186 194 187 195 - 5.2 INTEGRITY-AWARE FILESYSTEM 188 + 5.2 Integrity-Aware Filesystem 189 + ------------------------------ 196 190 197 191 A filesystem that is integrity-aware can prepare I/Os with IMD 198 192 attached. It can also use the application tag space if this is 199 193 supported by the block device. 200 194 201 195 202 - bool bio_integrity_prep(bio); 196 + `bool bio_integrity_prep(bio);` 203 197 204 198 To generate IMD for WRITE and to set up buffers for READ, the 205 199 filesystem must call bio_integrity_prep(bio). ··· 212 204 Complete bio with error if prepare failed for some reson. 213 205 214 206 215 - 5.3 PASSING EXISTING INTEGRITY METADATA 207 + 5.3 Passing Existing Integrity Metadata 208 + --------------------------------------- 216 209 217 210 Filesystems that either generate their own integrity metadata or 218 211 are capable of transferring IMD from user space can use the 219 212 following calls: 220 213 221 214 222 - struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages); 215 + `struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages);` 223 216 224 217 Allocates the bio integrity payload and hangs it off of the bio. 225 218 nr_pages indicate how many pages of protection data need to be ··· 229 220 The integrity payload will be freed at bio_free() time. 230 221 231 222 232 - int bio_integrity_add_page(bio, page, len, offset); 223 + `int bio_integrity_add_page(bio, page, len, offset);` 233 224 234 225 Attaches a page containing integrity metadata to an existing 235 226 bio. The bio must have an existing bip, ··· 250 241 integrity upon completion. 251 242 252 243 253 - 5.4 REGISTERING A BLOCK DEVICE AS CAPABLE OF EXCHANGING INTEGRITY 254 - METADATA 244 + 5.4 Registering A Block Device As Capable Of Exchanging Integrity Metadata 245 + -------------------------------------------------------------------------- 255 246 256 247 To enable integrity exchange on a block device the gendisk must be 257 248 registered as capable: 258 249 259 - int blk_integrity_register(gendisk, blk_integrity); 250 + `int blk_integrity_register(gendisk, blk_integrity);` 260 251 261 252 The blk_integrity struct is a template and should contain the 262 - following: 253 + following:: 263 254 264 255 static struct blk_integrity my_profile = { 265 256 .name = "STANDARDSBODY-TYPE-VARIANT-CSUM", 266 257 .generate_fn = my_generate_fn, 267 - .verify_fn = my_verify_fn, 258 + .verify_fn = my_verify_fn, 268 259 .tuple_size = sizeof(struct my_tuple_size), 269 260 .tag_size = <tag bytes per hw sector>, 270 261 }; ··· 287 278 0 depending on the value of the Control Mode Page ATO bit. 288 279 289 280 ---------------------------------------------------------------------- 281 + 290 282 2007-12-24 Martin K. Petersen <martin.petersen@oracle.com>
+9 -12
Documentation/block/deadline-iosched.txt Documentation/block/deadline-iosched.rst
··· 1 + ============================== 1 2 Deadline IO scheduler tunables 2 3 ============================== 3 4 ··· 8 7 9 8 Selecting IO schedulers 10 9 ----------------------- 11 - Refer to Documentation/block/switching-sched.txt for information on 10 + Refer to Documentation/block/switching-sched.rst for information on 12 11 selecting an io scheduler on a per-device basis. 13 12 14 - 15 - ******************************************************************************** 16 - 13 + ------------------------------------------------------------------------------ 17 14 18 15 read_expire (in ms) 19 - ----------- 16 + ----------------------- 20 17 21 18 The goal of the deadline io scheduler is to attempt to guarantee a start 22 19 service time for a request. As we focus mainly on read latencies, this is ··· 24 25 25 26 26 27 write_expire (in ms) 27 - ----------- 28 + ----------------------- 28 29 29 30 Similar to read_expire mentioned above, but for writes. 30 31 31 32 32 33 fifo_batch (number of requests) 33 - ---------- 34 + ------------------------------------ 34 35 35 - Requests are grouped into ``batches'' of a particular data direction (read or 36 + Requests are grouped into ``batches`` of a particular data direction (read or 36 37 write) which are serviced in increasing sector order. To limit extra seeking, 37 38 deadline expiries are only checked between batches. fifo_batch controls the 38 39 maximum number of requests per batch. ··· 44 45 45 46 46 47 writes_starved (number of dispatches) 47 - -------------- 48 + -------------------------------------- 48 49 49 50 When we have to move requests from the io scheduler queue to the block 50 51 device dispatch queue, we always give a preference to reads. However, we ··· 55 56 56 57 57 58 front_merges (bool) 58 - ------------ 59 + ---------------------- 59 60 60 61 Sometimes it happens that a request enters the io scheduler that is contiguous 61 62 with a request that is already on the queue. Either it fits in the back of that ··· 70 71 71 72 72 73 Nov 11 2002, Jens Axboe <jens.axboe@oracle.com> 73 - 74 -
+25
Documentation/block/index.rst
··· 1 + :orphan: 2 + 3 + ===== 4 + Block 5 + ===== 6 + 7 + .. toctree:: 8 + :maxdepth: 1 9 + 10 + bfq-iosched 11 + biodoc 12 + biovecs 13 + capability 14 + cmdline-partition 15 + data-integrity 16 + deadline-iosched 17 + ioprio 18 + kyber-iosched 19 + null_blk 20 + pr 21 + queue-sysfs 22 + request 23 + stat 24 + switching-sched 25 + writeback_cache_control
+47 -48
Documentation/block/ioprio.txt Documentation/block/ioprio.rst
··· 1 + =================== 1 2 Block io priorities 2 3 =================== 3 4 ··· 41 40 Tools 42 41 ----- 43 42 44 - See below for a sample ionice tool. Usage: 43 + See below for a sample ionice tool. Usage:: 45 44 46 - # ionice -c<class> -n<level> -p<pid> 45 + # ionice -c<class> -n<level> -p<pid> 47 46 48 47 If pid isn't given, the current process is assumed. IO priority settings 49 48 are inherited on fork, so you can use ionice to start the process at a given 50 - level: 49 + level:: 51 50 52 - # ionice -c2 -n0 /bin/ls 51 + # ionice -c2 -n0 /bin/ls 53 52 54 53 will run ls at the best-effort scheduling class at the highest priority. 55 - For a running process, you can give the pid instead: 54 + For a running process, you can give the pid instead:: 56 55 57 - # ionice -c1 -n2 -p100 56 + # ionice -c1 -n2 -p100 58 57 59 58 will change pid 100 to run at the realtime scheduling class, at priority 2. 60 59 61 - ---> snip ionice.c tool <--- 60 + ionice.c tool:: 62 61 63 - #include <stdio.h> 64 - #include <stdlib.h> 65 - #include <errno.h> 66 - #include <getopt.h> 67 - #include <unistd.h> 68 - #include <sys/ptrace.h> 69 - #include <asm/unistd.h> 62 + #include <stdio.h> 63 + #include <stdlib.h> 64 + #include <errno.h> 65 + #include <getopt.h> 66 + #include <unistd.h> 67 + #include <sys/ptrace.h> 68 + #include <asm/unistd.h> 70 69 71 - extern int sys_ioprio_set(int, int, int); 72 - extern int sys_ioprio_get(int, int); 70 + extern int sys_ioprio_set(int, int, int); 71 + extern int sys_ioprio_get(int, int); 73 72 74 - #if defined(__i386__) 75 - #define __NR_ioprio_set 289 76 - #define __NR_ioprio_get 290 77 - #elif defined(__ppc__) 78 - #define __NR_ioprio_set 273 79 - #define __NR_ioprio_get 274 80 - #elif defined(__x86_64__) 81 - #define __NR_ioprio_set 251 82 - #define __NR_ioprio_get 252 83 - #elif defined(__ia64__) 84 - #define __NR_ioprio_set 1274 85 - #define __NR_ioprio_get 1275 86 - #else 87 - #error "Unsupported arch" 88 - #endif 73 + #if defined(__i386__) 74 + #define __NR_ioprio_set 289 75 + #define __NR_ioprio_get 290 76 + #elif defined(__ppc__) 77 + #define __NR_ioprio_set 273 78 + #define __NR_ioprio_get 274 79 + #elif defined(__x86_64__) 80 + #define __NR_ioprio_set 251 81 + #define __NR_ioprio_get 252 82 + #elif defined(__ia64__) 83 + #define __NR_ioprio_set 1274 84 + #define __NR_ioprio_get 1275 85 + #else 86 + #error "Unsupported arch" 87 + #endif 89 88 90 - static inline int ioprio_set(int which, int who, int ioprio) 91 - { 89 + static inline int ioprio_set(int which, int who, int ioprio) 90 + { 92 91 return syscall(__NR_ioprio_set, which, who, ioprio); 93 - } 92 + } 94 93 95 - static inline int ioprio_get(int which, int who) 96 - { 94 + static inline int ioprio_get(int which, int who) 95 + { 97 96 return syscall(__NR_ioprio_get, which, who); 98 - } 97 + } 99 98 100 - enum { 99 + enum { 101 100 IOPRIO_CLASS_NONE, 102 101 IOPRIO_CLASS_RT, 103 102 IOPRIO_CLASS_BE, 104 103 IOPRIO_CLASS_IDLE, 105 - }; 104 + }; 106 105 107 - enum { 106 + enum { 108 107 IOPRIO_WHO_PROCESS = 1, 109 108 IOPRIO_WHO_PGRP, 110 109 IOPRIO_WHO_USER, 111 - }; 110 + }; 112 111 113 - #define IOPRIO_CLASS_SHIFT 13 112 + #define IOPRIO_CLASS_SHIFT 13 114 113 115 - const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; 114 + const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; 116 115 117 - int main(int argc, char *argv[]) 118 - { 116 + int main(int argc, char *argv[]) 117 + { 119 118 int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; 120 119 int c, pid = 0; 121 120 ··· 176 175 } 177 176 178 177 return 0; 179 - } 180 - 181 - ---> snip ionice.c tool <--- 178 + } 182 179 183 180 184 181 March 11 2005, Jens Axboe <jens.axboe@oracle.com>
+2 -1
Documentation/block/kyber-iosched.txt Documentation/block/kyber-iosched.rst
··· 1 + ============================ 1 2 Kyber I/O scheduler tunables 2 - =========================== 3 + ============================ 3 4 4 5 The only two tunables for the Kyber scheduler are the target latencies for 5 6 reads and synchronous writes. Kyber will throttle requests in order to meet
+46 -19
Documentation/block/null_blk.txt Documentation/block/null_blk.rst
··· 1 + ======================== 1 2 Null block device driver 2 - ================================================================================ 3 + ======================== 3 4 4 - I. Overview 5 + 1. Overview 6 + =========== 5 7 6 8 The null block device (/dev/nullb*) is used for benchmarking the various 7 9 block-layer implementations. It emulates a block device of X gigabytes in size. 8 10 The following instances are possible: 9 11 10 12 Single-queue block-layer 13 + 11 14 - Request-based. 12 15 - Single submission queue per device. 13 16 - Implements IO scheduling algorithms (CFQ, Deadline, noop). 17 + 14 18 Multi-queue block-layer 19 + 15 20 - Request-based. 16 21 - Configurable submission queues per device. 22 + 17 23 No block-layer (Known as bio-based) 24 + 18 25 - Bio-based. IO requests are submitted directly to the device driver. 19 26 - Directly accepts bio data structure and returns them. 20 27 21 28 All of them have a completion queue for each core in the system. 22 29 23 - II. Module parameters applicable for all instances: 30 + 2. Module parameters applicable for all instances 31 + ================================================= 24 32 25 33 queue_mode=[0-2]: Default: 2-Multi-queue 26 34 Selects which block-layer the module should instantiate with. 27 35 28 - 0: Bio-based. 29 - 1: Single-queue. 30 - 2: Multi-queue. 36 + = ============ 37 + 0 Bio-based 38 + 1 Single-queue 39 + 2 Multi-queue 40 + = ============ 31 41 32 42 home_node=[0--nr_nodes]: Default: NUMA_NO_NODE 33 43 Selects what CPU node the data structures are allocated from. ··· 55 45 irqmode=[0-2]: Default: 1-Soft-irq 56 46 The completion mode used for completing IOs to the block-layer. 57 47 58 - 0: None. 59 - 1: Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead 48 + = =========================================================================== 49 + 0 None. 50 + 1 Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead 60 51 when IOs are issued from another CPU node than the home the device is 61 52 connected to. 62 - 2: Timer: Waits a specific period (completion_nsec) for each IO before 53 + 2 Timer: Waits a specific period (completion_nsec) for each IO before 63 54 completion. 55 + = =========================================================================== 64 56 65 57 completion_nsec=[ns]: Default: 10,000ns 66 58 Combined with irqmode=2 (timer). The time each completion event must wait. ··· 78 66 III: Multi-queue specific parameters 79 67 80 68 use_per_node_hctx=[0/1]: Default: 0 81 - 0: The number of submit queues are set to the value of the submit_queues 69 + 70 + = ===================================================================== 71 + 0 The number of submit queues are set to the value of the submit_queues 82 72 parameter. 83 - 1: The multi-queue block layer is instantiated with a hardware dispatch 73 + 1 The multi-queue block layer is instantiated with a hardware dispatch 84 74 queue for each CPU node in the system. 75 + = ===================================================================== 85 76 86 77 no_sched=[0/1]: Default: 0 87 - 0: nullb* use default blk-mq io scheduler. 88 - 1: nullb* doesn't use io scheduler. 78 + 79 + = ====================================== 80 + 0 nullb* use default blk-mq io scheduler 81 + 1 nullb* doesn't use io scheduler 82 + = ====================================== 89 83 90 84 blocking=[0/1]: Default: 0 91 - 0: Register as a non-blocking blk-mq driver device. 92 - 1: Register as a blocking blk-mq driver device, null_blk will set 85 + 86 + = =============================================================== 87 + 0 Register as a non-blocking blk-mq driver device. 88 + 1 Register as a blocking blk-mq driver device, null_blk will set 93 89 the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always 94 90 needs to block in its ->queue_rq() function. 91 + = =============================================================== 95 92 96 93 shared_tags=[0/1]: Default: 0 97 - 0: Tag set is not shared. 98 - 1: Tag set shared between devices for blk-mq. Only makes sense with 94 + 95 + = ================================================================ 96 + 0 Tag set is not shared. 97 + 1 Tag set shared between devices for blk-mq. Only makes sense with 99 98 nr_devices > 1, otherwise there's no tag set to share. 99 + = ================================================================ 100 100 101 101 zoned=[0/1]: Default: 0 102 - 0: Block device is exposed as a random-access block device. 103 - 1: Block device is exposed as a host-managed zoned block device. Requires 102 + 103 + = ====================================================================== 104 + 0 Block device is exposed as a random-access block device. 105 + 1 Block device is exposed as a host-managed zoned block device. Requires 104 106 CONFIG_BLK_DEV_ZONED. 107 + = ====================================================================== 105 108 106 109 zone_size=[MB]: Default: 256 107 110 Per zone size when exposed as a zoned block device. Must be a power of two.
+9 -9
Documentation/block/pr.txt Documentation/block/pr.rst
··· 1 - 1 + =============================================== 2 2 Block layer support for Persistent Reservations 3 3 =============================================== 4 4 ··· 23 23 -------------------------------------------------- 24 24 25 25 - PR_WRITE_EXCLUSIVE 26 - 27 26 Only the initiator that owns the reservation can write to the 28 27 device. Any initiator can read from the device. 29 28 30 29 - PR_EXCLUSIVE_ACCESS 31 - 32 30 Only the initiator that owns the reservation can access the 33 31 device. 34 32 35 33 - PR_WRITE_EXCLUSIVE_REG_ONLY 36 - 37 34 Only initiators with a registered key can write to the device, 38 35 Any initiator can read from the device. 39 36 40 37 - PR_EXCLUSIVE_ACCESS_REG_ONLY 41 - 42 38 Only initiators with a registered key can access the device. 43 39 44 40 - PR_WRITE_EXCLUSIVE_ALL_REGS ··· 44 48 All initiators with a registered key are considered reservation 45 49 holders. 46 50 Please reference the SPC spec on the meaning of a reservation 47 - holder if you want to use this type. 51 + holder if you want to use this type. 48 52 49 53 - PR_EXCLUSIVE_ACCESS_ALL_REGS 50 - 51 54 Only initiators with a registered key can access the device. 52 55 All initiators with a registered key are considered reservation 53 56 holders. 54 57 Please reference the SPC spec on the meaning of a reservation 55 - holder if you want to use this type. 58 + holder if you want to use this type. 56 59 57 60 58 61 The following ioctl are supported: 59 62 ---------------------------------- 60 63 61 64 1. IOC_PR_REGISTER 65 + ^^^^^^^^^^^^^^^^^^ 62 66 63 67 This ioctl command registers a new reservation if the new_key argument 64 68 is non-null. If no existing reservation exists old_key must be zero, ··· 70 74 71 75 72 76 2. IOC_PR_RESERVE 77 + ^^^^^^^^^^^^^^^^^ 73 78 74 79 This ioctl command reserves the device and thus restricts access for other 75 80 devices based on the type argument. The key argument must be the existing ··· 79 82 80 83 81 84 3. IOC_PR_RELEASE 85 + ^^^^^^^^^^^^^^^^^ 82 86 83 87 This ioctl command releases the reservation specified by key and flags 84 88 and thus removes any access restriction implied by it. 85 89 86 90 87 91 4. IOC_PR_PREEMPT 92 + ^^^^^^^^^^^^^^^^^ 88 93 89 94 This ioctl command releases the existing reservation referred to by 90 95 old_key and replaces it with a new reservation of type for the ··· 94 95 95 96 96 97 5. IOC_PR_PREEMPT_ABORT 98 + ^^^^^^^^^^^^^^^^^^^^^^^ 97 99 98 100 This ioctl command works like IOC_PR_PREEMPT except that it also aborts 99 101 any outstanding command sent over a connection identified by old_key. 100 102 101 103 6. IOC_PR_CLEAR 104 + ^^^^^^^^^^^^^^^ 102 105 103 106 This ioctl command unregisters both key and any other reservation key 104 107 registered with the device and drops any existing reservation. ··· 112 111 All the ioctls have a flag field. Currently only one flag is supported: 113 112 114 113 - PR_FL_IGNORE_KEY 115 - 116 114 Ignore the existing reservation key. This is commonly supported for 117 115 IOC_PR_REGISTER, and some implementation may support the flag for 118 116 IOC_PR_RESERVE.
+4 -3
Documentation/block/queue-sysfs.txt Documentation/block/queue-sysfs.rst
··· 1 + ================= 1 2 Queue sysfs files 2 3 ================= 3 4 ··· 11 10 read-write. 12 11 13 12 add_random (RW) 14 - ---------------- 13 + --------------- 15 14 This file allows to turn off the disk entropy contribution. Default 16 15 value of this file is '1'(on). 17 16 ··· 31 30 if true, '0' if not. 32 31 33 32 discard_granularity (RO) 34 - ----------------------- 33 + ------------------------ 35 34 This shows the size of internal allocation of the device in bytes, if 36 35 reported by the device. A value of '0' means device does not support 37 36 the discard functionality. 38 37 39 38 discard_max_hw_bytes (RO) 40 - ---------------------- 39 + ------------------------- 41 40 Devices that support discard functionality may have internal limits on 42 41 the number of bytes that can be trimmed or unmapped in a single operation. 43 42 The discard_max_bytes parameter is set by the device driver to the maximum
+29 -18
Documentation/block/request.txt Documentation/block/request.rst
··· 1 - 1 + ============================ 2 2 struct request documentation 3 + ============================ 3 4 4 5 Jens Axboe <jens.axboe@oracle.com> 27/05/02 5 6 6 - 1.0 7 - Index 8 7 9 - 2.0 Struct request members classification 8 + .. FIXME: 9 + No idea about what does mean - seems just some noise, so comment it 10 10 11 - 2.1 struct request members explanation 11 + 1.0 12 + Index 12 13 13 - 3.0 14 + 2.0 Struct request members classification 15 + 16 + 2.1 struct request members explanation 17 + 18 + 3.0 14 19 15 20 16 - 2.0 21 + 2.0 22 + 23 + 24 + 17 25 Short explanation of request members 26 + ==================================== 18 27 19 28 Classification flags: 20 29 30 + = ==================== 21 31 D driver member 22 32 B block layer member 23 33 I I/O scheduler member 34 + = ==================== 24 35 25 36 Unless an entry contains a D classification, a device driver must not access 26 37 this member. Some members may contain D classifications, but should only be ··· 39 28 40 29 <linux/blkdev.h> 41 30 42 - 2.1 31 + =============================== ======= ======================================= 43 32 Member Flag Comment 44 - ------ ---- ------- 45 - 33 + =============================== ======= ======================================= 46 34 struct list_head queuelist BI Organization on various internal 47 35 queues 48 36 49 - void *elevator_private I I/O scheduler private data 37 + ``void *elevator_private`` I I/O scheduler private data 50 38 51 39 unsigned char cmd[16] D Driver can use this for setting up 52 40 a cdb before execution, see ··· 81 71 82 72 int tag DB TCQ tag, if assigned 83 73 84 - void *special D Free to be used by driver 74 + ``void *special`` D Free to be used by driver 85 75 86 - char *buffer D Map of first segment, also see 76 + ``char *buffer`` D Map of first segment, also see 87 77 section on bouncing SECTION 88 78 89 - struct completion *waiting D Can be used by driver to get signalled 79 + ``struct completion *waiting`` D Can be used by driver to get signalled 90 80 on request completion 91 81 92 - struct bio *bio DBI First bio in request 82 + ``struct bio *bio`` DBI First bio in request 93 83 94 - struct bio *biotail DBI Last bio in request 84 + ``struct bio *biotail`` DBI Last bio in request 95 85 96 - struct request_queue *q DB Request queue this request belongs to 86 + ``struct request_queue *q`` DB Request queue this request belongs to 97 87 98 - struct request_list *rl B Request list this request came from 88 + ``struct request_list *rl`` B Request list this request came from 89 + =============================== ======= =======================================
+10 -3
Documentation/block/stat.txt Documentation/block/stat.rst
··· 1 + =============================================== 1 2 Block layer statistics in /sys/block/<dev>/stat 2 3 =============================================== 3 4 ··· 7 6 The stat file provides several statistics about the state of block 8 7 device <dev>. 9 8 10 - Q. Why are there multiple statistics in a single file? Doesn't sysfs 9 + Q. 10 + Why are there multiple statistics in a single file? Doesn't sysfs 11 11 normally contain a single value per file? 12 - A. By having a single file, the kernel can guarantee that the statistics 12 + 13 + A. 14 + By having a single file, the kernel can guarantee that the statistics 13 15 represent a consistent snapshot of the state of the device. If the 14 16 statistics were exported as multiple files containing one statistic 15 17 each, it would be impossible to guarantee that a set of readings ··· 22 18 values separated by whitespace. The fields are summarized in the 23 19 following table, and described in more detail below. 24 20 21 + 22 + =============== ============= ================================================= 25 23 Name units description 26 - ---- ----- ----------- 24 + =============== ============= ================================================= 27 25 read I/Os requests number of read I/Os processed 28 26 read merges requests number of read I/Os merged with in-queue I/O 29 27 read sectors sectors number of sectors read ··· 41 35 discard merges requests number of discard I/Os merged with in-queue I/O 42 36 discard sectors sectors number of sectors discarded 43 37 discard ticks milliseconds total wait time for discard requests 38 + =============== ============= ================================================= 44 39 45 40 read I/Os, write I/Os, discard I/0s 46 41 ===================================
+16 -12
Documentation/block/switching-sched.txt Documentation/block/switching-sched.rst
··· 1 + =================== 2 + Switching Scheduler 3 + =================== 4 + 1 5 To choose IO schedulers at boot time, use the argument 'elevator=deadline'. 2 6 'noop' and 'cfq' (the default) are also available. IO schedulers are assigned 3 7 globally at boot time only presently. 4 8 5 9 Each io queue has a set of io scheduler tunables associated with it. These 6 10 tunables control how the io scheduler works. You can find these entries 7 - in: 11 + in:: 8 12 9 - /sys/block/<device>/queue/iosched 13 + /sys/block/<device>/queue/iosched 10 14 11 15 assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, 12 - you can do so by typing: 16 + you can do so by typing:: 13 17 14 - # mount none /sys -t sysfs 18 + # mount none /sys -t sysfs 15 19 16 20 It is possible to change the IO scheduler for a given block device on 17 21 the fly to select one of mq-deadline, none, bfq, or kyber schedulers - 18 22 which can improve that device's throughput. 19 23 20 - To set a specific scheduler, simply do this: 24 + To set a specific scheduler, simply do this:: 21 25 22 - echo SCHEDNAME > /sys/block/DEV/queue/scheduler 26 + echo SCHEDNAME > /sys/block/DEV/queue/scheduler 23 27 24 28 where SCHEDNAME is the name of a defined IO scheduler, and DEV is the 25 29 device name (hda, hdb, sga, or whatever you happen to have). 26 30 27 31 The list of defined schedulers can be found by simply doing 28 32 a "cat /sys/block/DEV/queue/scheduler" - the list of valid names 29 - will be displayed, with the currently selected scheduler in brackets: 33 + will be displayed, with the currently selected scheduler in brackets:: 30 34 31 - # cat /sys/block/sda/queue/scheduler 32 - [mq-deadline] kyber bfq none 33 - # echo none >/sys/block/sda/queue/scheduler 34 - # cat /sys/block/sda/queue/scheduler 35 - [none] mq-deadline kyber bfq 35 + # cat /sys/block/sda/queue/scheduler 36 + [mq-deadline] kyber bfq none 37 + # echo none >/sys/block/sda/queue/scheduler 38 + # cat /sys/block/sda/queue/scheduler 39 + [none] mq-deadline kyber bfq
+6 -6
Documentation/block/writeback_cache_control.txt Documentation/block/writeback_cache_control.rst
··· 1 - 1 + ========================================== 2 2 Explicit volatile write back cache control 3 - ===================================== 3 + ========================================== 4 4 5 5 Introduction 6 6 ------------ ··· 31 31 32 32 33 33 Forced Unit Access 34 - ----------------- 34 + ------------------ 35 35 36 36 The REQ_FUA flag can be OR ed into the r/w flags of a bio submitted from the 37 37 filesystem and will make sure that I/O completion for this request is only ··· 62 62 63 63 64 64 Implementation details for request_fn based block drivers 65 - -------------------------------------------------------------- 65 + --------------------------------------------------------- 66 66 67 67 For devices that do not support volatile write caches there is no driver 68 68 support required, the block layer completes empty REQ_PREFLUSH requests before 69 69 entering the driver and strips off the REQ_PREFLUSH and REQ_FUA bits from 70 70 requests that have a payload. For devices with volatile write caches the 71 71 driver needs to tell the block layer that it supports flushing caches by 72 - doing: 72 + doing:: 73 73 74 74 blk_queue_write_cache(sdkp->disk->queue, true, false); 75 75 ··· 77 77 REQ_PREFLUSH requests with a payload are automatically turned into a sequence 78 78 of an empty REQ_OP_FLUSH request followed by the actual write by the block 79 79 layer. For devices that also support the FUA bit the block layer needs 80 - to be told to pass through the REQ_FUA bit using: 80 + to be told to pass through the REQ_FUA bit using:: 81 81 82 82 blk_queue_write_cache(sdkp->disk->queue, true, true); 83 83
+1 -1
Documentation/blockdev/zram.rst
··· 215 215 216 216 File /sys/block/zram<id>/stat 217 217 218 - Represents block layer statistics. Read Documentation/block/stat.txt for 218 + Represents block layer statistics. Read Documentation/block/stat.rst for 219 219 details. 220 220 221 221 File /sys/block/zram<id>/io_stat
+1 -1
MAINTAINERS
··· 2968 2968 L: linux-block@vger.kernel.org 2969 2969 S: Maintained 2970 2970 F: block/bfq-* 2971 - F: Documentation/block/bfq-iosched.txt 2971 + F: Documentation/block/bfq-iosched.rst 2972 2972 2973 2973 BFS FILE SYSTEM 2974 2974 M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com>
+1 -1
block/Kconfig
··· 110 110 which don't otherwise have any standardized method for listing the 111 111 partitions on a block device. 112 112 113 - See Documentation/block/cmdline-partition.txt for more information. 113 + See Documentation/block/cmdline-partition.rst for more information. 114 114 115 115 config BLK_WBT 116 116 bool "Enable support for block device writeback throttling"
+1 -1
block/Kconfig.iosched
··· 26 26 regardless of the device parameters and with any workload. It 27 27 also guarantees a low latency to interactive and soft 28 28 real-time applications. Details in 29 - Documentation/block/bfq-iosched.txt 29 + Documentation/block/bfq-iosched.rst 30 30 31 31 config BFQ_GROUP_IOSCHED 32 32 bool "BFQ hierarchical scheduling support"
+1 -1
block/bfq-iosched.c
··· 17 17 * low-latency capabilities. BFQ also supports full hierarchical 18 18 * scheduling through cgroups. Next paragraphs provide an introduction 19 19 * on BFQ inner workings. Details on BFQ benefits, usage and 20 - * limitations can be found in Documentation/block/bfq-iosched.txt. 20 + * limitations can be found in Documentation/block/bfq-iosched.rst. 21 21 * 22 22 * BFQ is a proportional-share storage-I/O scheduling algorithm based 23 23 * on the slice-by-slice service scheme of CFQ. But BFQ assigns
+1 -1
block/blk-integrity.c
··· 383 383 * send/receive integrity metadata it must use this function to register 384 384 * the capability with the block layer. The template is a blk_integrity 385 385 * struct with values appropriate for the underlying hardware. See 386 - * Documentation/block/data-integrity.txt. 386 + * Documentation/block/data-integrity.rst. 387 387 */ 388 388 void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) 389 389 {
+1 -1
block/ioprio.c
··· 17 17 * 18 18 * ioprio_set(PRIO_PROCESS, pid, prio); 19 19 * 20 - * See also Documentation/block/ioprio.txt 20 + * See also Documentation/block/ioprio.rst 21 21 * 22 22 */ 23 23 #include <linux/gfp.h>
+1 -1
block/mq-deadline.c
··· 25 25 #include "blk-mq-sched.h" 26 26 27 27 /* 28 - * See Documentation/block/deadline-iosched.txt 28 + * See Documentation/block/deadline-iosched.rst 29 29 */ 30 30 static const int read_expire = HZ / 2; /* max time before a read is submitted. */ 31 31 static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */
+1 -1
block/partitions/cmdline.c
··· 11 11 * 12 12 * The format for the command line is just like mtdparts. 13 13 * 14 - * For further information, see "Documentation/block/cmdline-partition.txt" 14 + * For further information, see "Documentation/block/cmdline-partition.rst" 15 15 * 16 16 */ 17 17