Lines Matching refs:thresh
507 static unsigned long dirty_freerun_ceiling(unsigned long thresh, in dirty_freerun_ceiling() argument
510 return (thresh + bg_thresh) / 2; in dirty_freerun_ceiling()
513 static unsigned long hard_dirty_limit(unsigned long thresh) in hard_dirty_limit() argument
515 return max(thresh, global_dirty_limit); in hard_dirty_limit()
668 unsigned long thresh, in bdi_position_ratio() argument
675 unsigned long freerun = dirty_freerun_ceiling(thresh, bg_thresh); in bdi_position_ratio()
676 unsigned long limit = hard_dirty_limit(thresh); in bdi_position_ratio()
731 bdi_bg_thresh = div_u64((u64)bdi_thresh * bg_thresh, thresh); in bdi_position_ratio()
796 if (unlikely(bdi_thresh > thresh)) in bdi_position_ratio()
797 bdi_thresh = thresh; in bdi_position_ratio()
810 x = div_u64((u64)bdi_thresh << 16, thresh | 1); in bdi_position_ratio()
820 span = (thresh - bdi_thresh + 8 * write_bw) * (u64)x >> 16; in bdi_position_ratio()
896 static void update_dirty_limit(unsigned long thresh, unsigned long dirty) in update_dirty_limit() argument
903 if (limit < thresh) { in update_dirty_limit()
904 limit = thresh; in update_dirty_limit()
913 thresh = max(thresh, dirty); in update_dirty_limit()
914 if (limit > thresh) { in update_dirty_limit()
915 limit -= (limit - thresh) >> 5; in update_dirty_limit()
923 static void global_update_bandwidth(unsigned long thresh, in global_update_bandwidth() argument
938 update_dirty_limit(thresh, dirty); in global_update_bandwidth()
951 unsigned long thresh, in bdi_update_dirty_ratelimit() argument
959 unsigned long freerun = dirty_freerun_ceiling(thresh, bg_thresh); in bdi_update_dirty_ratelimit()
960 unsigned long limit = hard_dirty_limit(thresh); in bdi_update_dirty_ratelimit()
977 pos_ratio = bdi_position_ratio(bdi, thresh, bg_thresh, dirty, in bdi_update_dirty_ratelimit()
1115 unsigned long thresh, in __bdi_update_bandwidth() argument
1143 if (thresh) { in __bdi_update_bandwidth()
1144 global_update_bandwidth(thresh, dirty, now); in __bdi_update_bandwidth()
1145 bdi_update_dirty_ratelimit(bdi, thresh, bg_thresh, dirty, in __bdi_update_bandwidth()
1158 unsigned long thresh, in bdi_update_bandwidth() argument
1168 __bdi_update_bandwidth(bdi, thresh, bg_thresh, dirty, in bdi_update_bandwidth()
1182 unsigned long thresh) in dirty_poll_interval() argument
1184 if (thresh > dirty) in dirty_poll_interval()
1185 return 1UL << (ilog2(thresh - dirty) >> 1); in dirty_poll_interval()
1364 unsigned long thresh; in balance_dirty_pages() local
1386 thresh = bdi_thresh; in balance_dirty_pages()
1389 thresh = dirty_thresh; in balance_dirty_pages()
1402 if (dirty <= dirty_freerun_ceiling(thresh, bg_thresh)) { in balance_dirty_pages()
1406 dirty_poll_interval(dirty, thresh); in balance_dirty_pages()