• Home
  • Raw
  • Download

Lines Matching full:thresh

134 	unsigned long		thresh;		/* dirty threshold */  member
367 * domain_dirty_limits - calculate thresh and bg_thresh for a wb_domain
370 * Calculate @dtc->thresh and ->bg_thresh considering
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()
421 thresh += thresh / 4 + global_wb_domain.dirty_limit / 32; in domain_dirty_limits()
427 if (thresh > UINT_MAX) in domain_dirty_limits()
428 thresh = UINT_MAX; in domain_dirty_limits()
430 if (bg_thresh >= thresh) in domain_dirty_limits()
431 bg_thresh = thresh / 2; in domain_dirty_limits()
432 dtc->thresh = thresh; in domain_dirty_limits()
437 trace_global_dirty_state(bg_thresh, thresh); in domain_dirty_limits()
443 * @pdirty: out parameter for thresh
445 * Calculate bg_thresh and thresh for global_wb_domain. See
456 *pdirty = gdtc.thresh; in global_dirty_limits()
835 static unsigned long dirty_freerun_ceiling(unsigned long thresh, in dirty_freerun_ceiling() argument
838 return (thresh + bg_thresh) / 2; in dirty_freerun_ceiling()
842 unsigned long thresh) in hard_dirty_limit() argument
844 return max(thresh, dom->dirty_limit); in hard_dirty_limit()
886 unsigned long thresh = dtc->thresh; in __wb_calc_thresh() local
892 * Calculate this BDI's share of the thresh ratio. in __wb_calc_thresh()
897 wb_thresh = (thresh * (100 * BDI_RATIO_SCALE - bdi_min_ratio)) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
903 wb_thresh += (thresh * wb_min_ratio) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
904 if (wb_thresh > (thresh * wb_max_ratio) / (100 * BDI_RATIO_SCALE)) in __wb_calc_thresh()
905 wb_thresh = thresh * wb_max_ratio / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
910 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) in wb_calc_thresh() argument
913 .thresh = thresh }; in wb_calc_thresh()
1021 * - the wb dirty thresh drops quickly due to change of JBOD workload
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()
1164 * wb_setpoint = setpoint * wb_thresh / thresh in wb_position_ratio()
1166 x = div_u64((u64)wb_thresh << 16, dtc->thresh | 1); in wb_position_ratio()
1170 * (thresh - wb_thresh ~= 0) and transit to wb_thresh in JBOD case. in wb_position_ratio()
1172 * wb_thresh thresh - wb_thresh in wb_position_ratio()
1174 * thresh thresh 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()
1267 * Follow down slowly. Use the higher one as the target, because 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()
1662 dtc->wb_bg_thresh = dtc->thresh ? in wb_dirty_limits()
1663 div_u64((u64)dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0; in wb_dirty_limits()
1670 * Otherwise it would be possible to get thresh+n pages in wb_dirty_limits()
1671 * reported dirty, even though there are thresh-m pages 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()
1954 * This is typically equal to (dirty < thresh) and can also in balance_dirty_pages()
2107 unsigned long thresh; in wb_over_bg_thresh() local
2120 thresh = wb_calc_thresh(gdtc->wb, 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->wb, 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()