Lines Matching refs:thresh

134 	unsigned long		thresh;		/* dirty threshold */
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;
409 thresh = DIV_ROUND_UP(bytes, PAGE_SIZE);
411 thresh = (ratio * available_memory) / PAGE_SIZE;
418 if (bg_thresh >= thresh)
419 bg_thresh = thresh / 2;
423 thresh += thresh / 4 + global_wb_domain.dirty_limit / 32;
425 dtc->thresh = thresh;
430 trace_global_dirty_state(bg_thresh, thresh);
436 * @pdirty: out parameter for thresh
438 * Calculate bg_thresh and thresh for global_wb_domain. See
449 *pdirty = gdtc.thresh;
813 static unsigned long dirty_freerun_ceiling(unsigned long thresh,
816 return (thresh + bg_thresh) / 2;
820 unsigned long thresh)
822 return max(thresh, dom->dirty_limit);
864 unsigned long thresh = dtc->thresh;
870 * Calculate this BDI's share of the thresh ratio.
875 wb_thresh = (thresh * (100 * BDI_RATIO_SCALE - bdi_min_ratio)) / (100 * BDI_RATIO_SCALE);
881 wb_thresh += (thresh * wb_min_ratio) / (100 * BDI_RATIO_SCALE);
882 if (wb_thresh > (thresh * wb_max_ratio) / (100 * BDI_RATIO_SCALE))
883 wb_thresh = thresh * wb_max_ratio / (100 * BDI_RATIO_SCALE);
888 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh)
891 .thresh = thresh };
999 * - the wb dirty thresh drops quickly due to change of JBOD workload
1005 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh);
1006 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh);
1130 if (unlikely(wb_thresh > dtc->thresh))
1131 wb_thresh = dtc->thresh;
1142 * wb_setpoint = setpoint * wb_thresh / thresh
1144 x = div_u64((u64)wb_thresh << 16, dtc->thresh | 1);
1148 * (thresh - wb_thresh ~= 0) and transit to wb_thresh in JBOD case.
1150 * wb_thresh thresh - wb_thresh
1152 * thresh thresh
1154 span = (dtc->thresh - wb_thresh + 8 * write_bw) * (u64)x >> 16;
1233 unsigned long thresh = dtc->thresh;
1239 if (limit < thresh) {
1240 limit = thresh;
1245 * Follow down slowly. Use the higher one as the target, because thresh
1249 thresh = max(thresh, dtc->dirty);
1250 if (limit > thresh) {
1251 limit -= (limit - thresh) >> 5;
1290 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh);
1291 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh);
1519 unsigned long thresh)
1521 if (thresh > dirty)
1522 return 1UL << (ilog2(thresh - dirty) >> 1);
1640 dtc->wb_bg_thresh = dtc->thresh ?
1641 div64_u64(dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0;
1648 * Otherwise it would be possible to get thresh+n pages
1649 * reported dirty, even though there are thresh-m pages
1694 unsigned long dirty, thresh, bg_thresh;
1709 thresh = gdtc->wb_thresh;
1713 thresh = gdtc->thresh;
1738 m_thresh = mdtc->thresh;
1768 if (dirty <= dirty_freerun_ceiling(thresh, bg_thresh) &&
1775 intv = dirty_poll_interval(dirty, thresh);
1811 ((gdtc->dirty > gdtc->thresh) || strictlimit);
1838 ((mdtc->dirty > mdtc->thresh) || strictlimit);
1879 sdtc->thresh,
1908 sdtc->thresh,
1932 * This is typically equal to (dirty < thresh) and can also
2085 unsigned long thresh;
2098 thresh = wb_calc_thresh(gdtc->wb, gdtc->bg_thresh);
2099 if (thresh < 2 * wb_stat_error())
2104 if (reclaimable > thresh)
2118 thresh = wb_calc_thresh(mdtc->wb, mdtc->bg_thresh);
2119 if (thresh < 2 * wb_stat_error())
2124 if (reclaimable > thresh)