Lines Matching refs:thresh

134 	unsigned long		thresh;		/* dirty threshold */  member
384 unsigned long thresh; in domain_dirty_limits() local
409 thresh = DIV_ROUND_UP(bytes, PAGE_SIZE); in domain_dirty_limits()
411 thresh = (ratio * available_memory) / PAGE_SIZE; in domain_dirty_limits()
418 if (bg_thresh >= thresh) in domain_dirty_limits()
419 bg_thresh = thresh / 2; in domain_dirty_limits()
423 thresh += thresh / 4 + global_wb_domain.dirty_limit / 32; in domain_dirty_limits()
425 dtc->thresh = thresh; in domain_dirty_limits()
430 trace_global_dirty_state(bg_thresh, thresh); in domain_dirty_limits()
449 *pdirty = gdtc.thresh; in global_dirty_limits()
813 static unsigned long dirty_freerun_ceiling(unsigned long thresh, in dirty_freerun_ceiling() argument
816 return (thresh + bg_thresh) / 2; in dirty_freerun_ceiling()
820 unsigned long thresh) in hard_dirty_limit() argument
822 return max(thresh, dom->dirty_limit); in hard_dirty_limit()
865 unsigned long thresh) in __wb_calc_thresh() argument
878 wb_thresh = (thresh * (100 * BDI_RATIO_SCALE - bdi_min_ratio)) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
884 wb_thresh += (thresh * wb_min_ratio) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
885 if (wb_thresh > (thresh * wb_max_ratio) / (100 * BDI_RATIO_SCALE)) in __wb_calc_thresh()
886 wb_thresh = thresh * wb_max_ratio / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
891 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) in wb_calc_thresh() argument
895 return __wb_calc_thresh(&gdtc, thresh); in wb_calc_thresh()
914 return __wb_calc_thresh(&mdtc, mdtc.thresh); in cgwb_calc_thresh()
1027 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_position_ratio()
1028 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_position_ratio()
1152 if (unlikely(wb_thresh > dtc->thresh)) in wb_position_ratio()
1153 wb_thresh = dtc->thresh; in wb_position_ratio()
1166 x = div_u64((u64)wb_thresh << 16, dtc->thresh | 1); in wb_position_ratio()
1176 span = (dtc->thresh - wb_thresh + 8 * write_bw) * (u64)x >> 16; in wb_position_ratio()
1255 unsigned long thresh = dtc->thresh; in update_dirty_limit() local
1261 if (limit < thresh) { in update_dirty_limit()
1262 limit = thresh; in update_dirty_limit()
1271 thresh = max(thresh, dtc->dirty); in update_dirty_limit()
1272 if (limit > thresh) { in update_dirty_limit()
1273 limit -= (limit - thresh) >> 5; in update_dirty_limit()
1312 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_update_dirty_ratelimit()
1313 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_update_dirty_ratelimit()
1541 unsigned long thresh) in dirty_poll_interval() argument
1543 if (thresh > dirty) in dirty_poll_interval()
1544 return 1UL << (ilog2(thresh - dirty) >> 1); in dirty_poll_interval()
1661 dtc->wb_thresh = __wb_calc_thresh(dtc, dtc->thresh); in wb_dirty_limits()
1662 dtc->wb_bg_thresh = dtc->thresh ? in wb_dirty_limits()
1663 div64_u64(dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0; in wb_dirty_limits()
1716 unsigned long dirty, thresh, bg_thresh; in balance_dirty_pages() local
1731 thresh = gdtc->wb_thresh; in balance_dirty_pages()
1735 thresh = gdtc->thresh; in balance_dirty_pages()
1760 m_thresh = mdtc->thresh; in balance_dirty_pages()
1790 if (dirty <= dirty_freerun_ceiling(thresh, bg_thresh) && in balance_dirty_pages()
1797 intv = dirty_poll_interval(dirty, thresh); in balance_dirty_pages()
1833 ((gdtc->dirty > gdtc->thresh) || strictlimit); in balance_dirty_pages()
1860 ((mdtc->dirty > mdtc->thresh) || strictlimit); in balance_dirty_pages()
1901 sdtc->thresh, in balance_dirty_pages()
1930 sdtc->thresh, in balance_dirty_pages()
2107 unsigned long thresh; in wb_over_bg_thresh() local
2120 thresh = __wb_calc_thresh(gdtc, gdtc->bg_thresh); in wb_over_bg_thresh()
2121 if (thresh < 2 * wb_stat_error()) in wb_over_bg_thresh()
2126 if (reclaimable > thresh) in wb_over_bg_thresh()
2140 thresh = __wb_calc_thresh(mdtc, mdtc->bg_thresh); in wb_over_bg_thresh()
2141 if (thresh < 2 * wb_stat_error()) in wb_over_bg_thresh()
2146 if (reclaimable > thresh) in wb_over_bg_thresh()