mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
writeback: avoid unnecessary calculation of bdi dirty thresholds
Split get_dirty_limits() into global_dirty_limits()+bdi_dirty_limit(), so that the latter can be avoided when under global dirty background threshold (which is the normal state for most systems). Signed-off-by: Wu Fengguang <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e50e37201a
commit
16c4042f08
4 changed files with 44 additions and 41 deletions
|
|
@ -590,7 +590,7 @@ static inline bool over_bground_thresh(void)
|
|||
{
|
||||
unsigned long background_thresh, dirty_thresh;
|
||||
|
||||
get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL);
|
||||
global_dirty_limits(&background_thresh, &dirty_thresh);
|
||||
|
||||
return (global_page_state(NR_FILE_DIRTY) +
|
||||
global_page_state(NR_UNSTABLE_NFS) >= background_thresh);
|
||||
|
|
|
|||
Loading…
Reference in a new issue