a42dde0415
Add "max_ratio" to /sys/class/bdi. This indicates the maximum percentage of the global dirty threshold allocated to this bdi. [mszeredi@suse.cz] - fix parsing in max_ratio_store(). - export bdi_set_max_ratio() to modules - limit bdi_dirty with bdi->max_ratio - document new sysfs attribute Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
What: /sys/class/bdi/<bdi>/
|
|
Date: January 2008
|
|
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
|
Description:
|
|
|
|
Provide a place in sysfs for the backing_dev_info object.
|
|
This allows us to see and set the various BDI specific variables.
|
|
|
|
The <bdi> identifier can be either of the following:
|
|
|
|
MAJOR:MINOR
|
|
|
|
Device number for block devices, or value of st_dev on
|
|
non-block filesystems which provide their own BDI, such as NFS
|
|
and FUSE.
|
|
|
|
default
|
|
|
|
The default backing dev, used for non-block device backed
|
|
filesystems which do not provide their own BDI.
|
|
|
|
Files under /sys/class/bdi/<bdi>/
|
|
---------------------------------
|
|
|
|
read_ahead_kb (read-write)
|
|
|
|
Size of the read-ahead window in kilobytes
|
|
|
|
reclaimable_kb (read-only)
|
|
|
|
Reclaimable (dirty or unstable) memory destined for writeback
|
|
to this device
|
|
|
|
writeback_kb (read-only)
|
|
|
|
Memory currently under writeback to this device
|
|
|
|
dirty_kb (read-only)
|
|
|
|
Global threshold for reclaimable + writeback memory
|
|
|
|
bdi_dirty_kb (read-only)
|
|
|
|
Current threshold on this BDI for reclaimable + writeback
|
|
memory
|
|
|
|
min_ratio (read-write)
|
|
|
|
Minimal percentage of global dirty threshold allocated to this
|
|
bdi. If the value written to this file would make the the sum
|
|
of all min_ratio values exceed 100, then EINVAL is returned.
|
|
If min_ratio would become larger than the current max_ratio,
|
|
then also EINVAL is returned. The default is zero
|
|
|
|
max_ratio (read-write)
|
|
|
|
Maximal percentage of global dirty threshold allocated to this
|
|
bdi. If max_ratio would become smaller than the current
|
|
min_ratio, then EINVAL is returned. The default is 100
|