Lines 276-281
void balance_dirty_pages_ratelimited(str
Link Here
|
276 |
} |
276 |
} |
277 |
EXPORT_SYMBOL(balance_dirty_pages_ratelimited); |
277 |
EXPORT_SYMBOL(balance_dirty_pages_ratelimited); |
278 |
|
278 |
|
|
|
279 |
void throttle_vm_writeout(void) |
280 |
{ |
281 |
struct writeback_state wbs; |
282 |
long background_thresh; |
283 |
long dirty_thresh; |
284 |
|
285 |
for ( ; ; ) { |
286 |
get_dirty_limits(&wbs, &background_thresh, &dirty_thresh); |
287 |
|
288 |
/* |
289 |
* Boost the allowable dirty threshold a bit for page |
290 |
* allocators so they don't get DoS'ed by heavy writers |
291 |
*/ |
292 |
dirty_thresh += dirty_thresh / 10; /* wheeee... */ |
293 |
|
294 |
if (wbs.nr_unstable + wbs.nr_writeback <= dirty_thresh) |
295 |
break; |
296 |
blk_congestion_wait(WRITE, HZ/10); |
297 |
} |
298 |
} |
299 |
|
300 |
|
279 |
/* |
301 |
/* |
280 |
* writeback at least _min_pages, and keep writing until the amount of dirty |
302 |
* writeback at least _min_pages, and keep writing until the amount of dirty |
281 |
* memory is less than the background threshold, or until we're all clean. |
303 |
* memory is less than the background threshold, or until we're all clean. |