1cf0ca9feSPeter ZijlstraWhat:		/sys/class/bdi/<bdi>/
2cf0ca9feSPeter ZijlstraDate:		January 2008
3cf0ca9feSPeter ZijlstraContact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
4cf0ca9feSPeter ZijlstraDescription:
5cf0ca9feSPeter Zijlstra
676f1418bSMiklos SzerediProvide a place in sysfs for the backing_dev_info object.  This allows
776f1418bSMiklos Szeredisetting and retrieving various BDI specific variables.
8cf0ca9feSPeter Zijlstra
9cf0ca9feSPeter ZijlstraThe <bdi> identifier can be either of the following:
10cf0ca9feSPeter Zijlstra
11cf0ca9feSPeter ZijlstraMAJOR:MINOR
12cf0ca9feSPeter Zijlstra
13cf0ca9feSPeter Zijlstra	Device number for block devices, or value of st_dev on
14cf0ca9feSPeter Zijlstra	non-block filesystems which provide their own BDI, such as NFS
15cf0ca9feSPeter Zijlstra	and FUSE.
16cf0ca9feSPeter Zijlstra
1703fb0bceSMiklos SzerediMAJOR:MINOR-fuseblk
1803fb0bceSMiklos Szeredi
1903fb0bceSMiklos Szeredi	Value of st_dev on fuseblk filesystems.
2003fb0bceSMiklos Szeredi
21cf0ca9feSPeter Zijlstradefault
22cf0ca9feSPeter Zijlstra
23cf0ca9feSPeter Zijlstra	The default backing dev, used for non-block device backed
24cf0ca9feSPeter Zijlstra	filesystems which do not provide their own BDI.
25cf0ca9feSPeter Zijlstra
268a609589SMauro Carvalho ChehabWhat:		/sys/class/bdi/<bdi>/read_ahead_kb
278a609589SMauro Carvalho ChehabDate:		January 2008
288a609589SMauro Carvalho ChehabContact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
298a609589SMauro Carvalho ChehabDescription:
30cf0ca9feSPeter Zijlstra	Size of the read-ahead window in kilobytes
31cf0ca9feSPeter Zijlstra
328a609589SMauro Carvalho Chehab	(read-write)
338a609589SMauro Carvalho ChehabWhat:		/sys/class/bdi/<bdi>/min_ratio
348a609589SMauro Carvalho ChehabDate:		January 2008
358a609589SMauro Carvalho ChehabContact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
368a609589SMauro Carvalho ChehabDescription:
3776f1418bSMiklos Szeredi	Under normal circumstances each device is given a part of the
3876f1418bSMiklos Szeredi	total write-back cache that relates to its current average
3976f1418bSMiklos Szeredi	writeout speed in relation to the other devices.
4076f1418bSMiklos Szeredi
4176f1418bSMiklos Szeredi	The 'min_ratio' parameter allows assigning a minimum
4276f1418bSMiklos Szeredi	percentage of the write-back cache to a particular device.
4376f1418bSMiklos Szeredi	For example, this is useful for providing a minimum QoS.
44a42dde04SPeter Zijlstra
458a609589SMauro Carvalho Chehab	(read-write)
46a42dde04SPeter Zijlstra
47*eba39236SStefan RoeschWhat:		/sys/class/bdi/<bdi>/min_ratio_fine
48*eba39236SStefan RoeschDate:		November 2022
49*eba39236SStefan RoeschContact:	Stefan Roesch <shr@devkernel.io>
50*eba39236SStefan RoeschDescription:
51*eba39236SStefan Roesch	Under normal circumstances each device is given a part of the
52*eba39236SStefan Roesch	total write-back cache that relates to its current average
53*eba39236SStefan Roesch	writeout speed in relation to the other devices.
54*eba39236SStefan Roesch
55*eba39236SStefan Roesch	The 'min_ratio_fine' parameter allows assigning a minimum reserve
56*eba39236SStefan Roesch	of the write-back cache to a particular device. The value is
57*eba39236SStefan Roesch	expressed as part of 1 million. For example, this is useful for
58*eba39236SStefan Roesch	providing a minimum QoS.
59*eba39236SStefan Roesch
60*eba39236SStefan Roesch	(read-write)
61*eba39236SStefan Roesch
628a609589SMauro Carvalho ChehabWhat:		/sys/class/bdi/<bdi>/max_ratio
638a609589SMauro Carvalho ChehabDate:		January 2008
648a609589SMauro Carvalho ChehabContact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
658a609589SMauro Carvalho ChehabDescription:
6676f1418bSMiklos Szeredi	Allows limiting a particular device to use not more than the
6776f1418bSMiklos Szeredi	given percentage of the write-back cache.  This is useful in
6876f1418bSMiklos Szeredi	situations where we want to avoid one device taking all or
6976f1418bSMiklos Szeredi	most of the write-back cache.  For example in case of an NFS
7076f1418bSMiklos Szeredi	mount that is prone to get stuck, or a FUSE mount which cannot
7176f1418bSMiklos Szeredi	be trusted to play fair.
727d311cdaSDarrick J. Wong
738a609589SMauro Carvalho Chehab	(read-write)
74c354d926SStefan Roesch
7554790f30SStefan RoeschWhat:		/sys/class/bdi/<bdi>/max_ratio_fine
7654790f30SStefan RoeschDate:		November 2022
7754790f30SStefan RoeschContact:	Stefan Roesch <shr@devkernel.io>
7854790f30SStefan RoeschDescription:
7954790f30SStefan Roesch	Allows limiting a particular device to use not more than the
8054790f30SStefan Roesch	given value of the write-back cache.  The value is given as part
8154790f30SStefan Roesch	of 1 million. This is useful in situations where we want to avoid
8254790f30SStefan Roesch	one device taking all or most of the write-back cache.  For example
8354790f30SStefan Roesch	in case of an NFS mount that is prone to get stuck, or a FUSE mount
8454790f30SStefan Roesch	which cannot be trusted to play fair.
8554790f30SStefan Roesch
8654790f30SStefan Roesch	(read-write)
8754790f30SStefan Roesch
889c832a8dSStefan RoeschWhat:		/sys/class/bdi/<bdi>/min_bytes
899c832a8dSStefan RoeschDate:		October 2022
909c832a8dSStefan RoeschContact:	Stefan Roesch <shr@devkernel.io>
919c832a8dSStefan RoeschDescription:
929c832a8dSStefan Roesch	Under normal circumstances each device is given a part of the
939c832a8dSStefan Roesch	total write-back cache that relates to its current average
949c832a8dSStefan Roesch	writeout speed in relation to the other devices.
959c832a8dSStefan Roesch
969c832a8dSStefan Roesch	The 'min_bytes' parameter allows assigning a minimum
979c832a8dSStefan Roesch	percentage of the write-back cache to a particular device
989c832a8dSStefan Roesch	expressed in bytes.
999c832a8dSStefan Roesch	For example, this is useful for providing a minimum QoS.
1009c832a8dSStefan Roesch
1019c832a8dSStefan Roesch	(read-write)
1029c832a8dSStefan Roesch
103c354d926SStefan RoeschWhat:		/sys/class/bdi/<bdi>/max_bytes
104c354d926SStefan RoeschDate:		October 2022
105c354d926SStefan RoeschContact:	Stefan Roesch <shr@devkernel.io>
106c354d926SStefan RoeschDescription:
107c354d926SStefan Roesch	Allows limiting a particular device to use not more than the
108c354d926SStefan Roesch	given 'max_bytes' of the write-back cache.  This is useful in
109c354d926SStefan Roesch	situations where we want to avoid one device taking all or
110c354d926SStefan Roesch	most of the write-back cache.  For example in case of an NFS
111c354d926SStefan Roesch	mount that is prone to get stuck, a FUSE mount which cannot be
112c354d926SStefan Roesch	trusted to play fair, or a nbd device.
113c354d926SStefan Roesch
114c354d926SStefan Roesch	(read-write)
115c354d926SStefan Roesch
11616b837ebSStefan RoeschWhat:		/sys/class/bdi/<bdi>/strict_limit
11716b837ebSStefan RoeschDate:		October 2022
11816b837ebSStefan RoeschContact:	Stefan Roesch <shr@devkernel.io>
11916b837ebSStefan RoeschDescription:
12016b837ebSStefan Roesch	Forces per-BDI checks for the share of given device in the write-back
12116b837ebSStefan Roesch	cache even before the global background dirty limit is reached. This
12216b837ebSStefan Roesch	is useful in situations where the global limit is much higher than
12316b837ebSStefan Roesch	affordable for given relatively slow (or untrusted) device. Turning
12416b837ebSStefan Roesch	strictlimit on has no visible effect if max_ratio is equal to 100%.
12516b837ebSStefan Roesch
12616b837ebSStefan Roesch	(read-write)
1278a609589SMauro Carvalho ChehabWhat:		/sys/class/bdi/<bdi>/stable_pages_required
1288a609589SMauro Carvalho ChehabDate:		January 2008
1298a609589SMauro Carvalho ChehabContact:	Peter Zijlstra <a.p.zijlstra@chello.nl>
1308a609589SMauro Carvalho ChehabDescription:
1317d311cdaSDarrick J. Wong	If set, the backing device requires that all pages comprising a write
1327d311cdaSDarrick J. Wong	request must not be changed until writeout is complete.
1338a609589SMauro Carvalho Chehab
1348a609589SMauro Carvalho Chehab	(read-only)
135