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
Showing the changes to include/linux/backing-dev.h (1 of 6 files). Show all
Unified · Split
| @@ -52,6 +52,7 @@ struct backing_dev_info { · 51 unmodified lines | ||
| 52 | 52 | int dirty_exceeded; |
| 53 | 53 | |
| 54 | 54 | unsigned int min_ratio; |
| 55 | + unsigned int max_ratio, max_prop_frac; | |
| 55 | 56 | |
| 56 | 57 | struct device *dev; |
| 57 | 58 | }; |
| @@ -140,6 +141,7 @@ static inline unsigned long bdi_stat_error(struct backing_dev_info *bdi) · 82 unmodified lines | ||
| 140 | 141 | } |
| 141 | 142 | |
| 142 | 143 | int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio); |
| 144 | +int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |
| 143 | 145 | |
| 144 | 146 | /* |
| 145 | 147 | * Flags in backing_dev_info::capability |