Peter Zijlstra | cf0ca9f | 2008-04-30 00:54:32 -0700 | [diff] [blame] | 1 | What: /sys/class/bdi/<bdi>/ |
| 2 | Date: January 2008 |
| 3 | Contact: Peter Zijlstra <a.p.zijlstra@chello.nl> |
| 4 | Description: |
| 5 | |
Miklos Szeredi | 76f1418 | 2008-04-30 00:54:36 -0700 | [diff] [blame^] | 6 | Provide a place in sysfs for the backing_dev_info object. This allows |
| 7 | setting and retrieving various BDI specific variables. |
Peter Zijlstra | cf0ca9f | 2008-04-30 00:54:32 -0700 | [diff] [blame] | 8 | |
| 9 | The <bdi> identifier can be either of the following: |
| 10 | |
| 11 | MAJOR:MINOR |
| 12 | |
| 13 | Device number for block devices, or value of st_dev on |
| 14 | non-block filesystems which provide their own BDI, such as NFS |
| 15 | and FUSE. |
| 16 | |
| 17 | default |
| 18 | |
| 19 | The default backing dev, used for non-block device backed |
| 20 | filesystems which do not provide their own BDI. |
| 21 | |
| 22 | Files under /sys/class/bdi/<bdi>/ |
| 23 | --------------------------------- |
| 24 | |
| 25 | read_ahead_kb (read-write) |
| 26 | |
| 27 | Size of the read-ahead window in kilobytes |
| 28 | |
Peter Zijlstra | 189d3c4 | 2008-04-30 00:54:35 -0700 | [diff] [blame] | 29 | min_ratio (read-write) |
| 30 | |
Miklos Szeredi | 76f1418 | 2008-04-30 00:54:36 -0700 | [diff] [blame^] | 31 | Under normal circumstances each device is given a part of the |
| 32 | total write-back cache that relates to its current average |
| 33 | writeout speed in relation to the other devices. |
| 34 | |
| 35 | The 'min_ratio' parameter allows assigning a minimum |
| 36 | percentage of the write-back cache to a particular device. |
| 37 | For example, this is useful for providing a minimum QoS. |
Peter Zijlstra | a42dde0 | 2008-04-30 00:54:36 -0700 | [diff] [blame] | 38 | |
| 39 | max_ratio (read-write) |
| 40 | |
Miklos Szeredi | 76f1418 | 2008-04-30 00:54:36 -0700 | [diff] [blame^] | 41 | Allows limiting a particular device to use not more than the |
| 42 | given percentage of the write-back cache. This is useful in |
| 43 | situations where we want to avoid one device taking all or |
| 44 | most of the write-back cache. For example in case of an NFS |
| 45 | mount that is prone to get stuck, or a FUSE mount which cannot |
| 46 | be trusted to play fair. |