Lines Matching refs:thresh

142 	unsigned long		thresh;		/* dirty threshold */  member
404 unsigned long thresh; in domain_dirty_limits() local
429 thresh = DIV_ROUND_UP(bytes, PAGE_SIZE); in domain_dirty_limits()
431 thresh = (ratio * available_memory) / PAGE_SIZE; in domain_dirty_limits()
438 if (bg_thresh >= thresh) in domain_dirty_limits()
439 bg_thresh = thresh / 2; in domain_dirty_limits()
443 thresh += thresh / 4 + global_wb_domain.dirty_limit / 32; in domain_dirty_limits()
445 dtc->thresh = thresh; in domain_dirty_limits()
450 trace_global_dirty_state(bg_thresh, thresh); in domain_dirty_limits()
469 *pdirty = gdtc.thresh; in global_dirty_limits()
713 static unsigned long dirty_freerun_ceiling(unsigned long thresh, in dirty_freerun_ceiling() argument
716 return (thresh + bg_thresh) / 2; in dirty_freerun_ceiling()
720 unsigned long thresh) in hard_dirty_limit() argument
722 return max(thresh, dom->dirty_limit); in hard_dirty_limit()
764 unsigned long thresh = dtc->thresh; in __wb_calc_thresh() local
775 wb_thresh = (thresh * (100 - bdi_min_ratio)) / 100; in __wb_calc_thresh()
781 wb_thresh += (thresh * wb_min_ratio) / 100; in __wb_calc_thresh()
782 if (wb_thresh > (thresh * wb_max_ratio) / 100) in __wb_calc_thresh()
783 wb_thresh = thresh * wb_max_ratio / 100; in __wb_calc_thresh()
788 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) in wb_calc_thresh() argument
791 .thresh = thresh }; in wb_calc_thresh()
905 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_position_ratio()
906 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_position_ratio()
1030 if (unlikely(wb_thresh > dtc->thresh)) in wb_position_ratio()
1031 wb_thresh = dtc->thresh; in wb_position_ratio()
1044 x = div_u64((u64)wb_thresh << 16, dtc->thresh | 1); in wb_position_ratio()
1054 span = (dtc->thresh - wb_thresh + 8 * write_bw) * (u64)x >> 16; in wb_position_ratio()
1133 unsigned long thresh = dtc->thresh; in update_dirty_limit() local
1139 if (limit < thresh) { in update_dirty_limit()
1140 limit = thresh; in update_dirty_limit()
1149 thresh = max(thresh, dtc->dirty); in update_dirty_limit()
1150 if (limit > thresh) { in update_dirty_limit()
1151 limit -= (limit - thresh) >> 5; in update_dirty_limit()
1190 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_update_dirty_ratelimit()
1191 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_update_dirty_ratelimit()
1408 unsigned long thresh) in dirty_poll_interval() argument
1410 if (thresh > dirty) in dirty_poll_interval()
1411 return 1UL << (ilog2(thresh - dirty) >> 1); in dirty_poll_interval()
1529 dtc->wb_bg_thresh = dtc->thresh ? in wb_dirty_limits()
1530 div_u64((u64)dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0; in wb_dirty_limits()
1582 unsigned long dirty, thresh, bg_thresh; in balance_dirty_pages() local
1597 thresh = gdtc->wb_thresh; in balance_dirty_pages()
1601 thresh = gdtc->thresh; in balance_dirty_pages()
1626 m_thresh = mdtc->thresh; in balance_dirty_pages()
1646 if (dirty <= dirty_freerun_ceiling(thresh, bg_thresh) && in balance_dirty_pages()
1653 intv = dirty_poll_interval(dirty, thresh); in balance_dirty_pages()
1688 ((gdtc->dirty > gdtc->thresh) || strictlimit); in balance_dirty_pages()
1715 ((mdtc->dirty > mdtc->thresh) || strictlimit); in balance_dirty_pages()
1759 sdtc->thresh, in balance_dirty_pages()
1788 sdtc->thresh, in balance_dirty_pages()
1955 unsigned long thresh; in wb_over_bg_thresh() local
1968 thresh = wb_calc_thresh(gdtc->wb, gdtc->bg_thresh); in wb_over_bg_thresh()
1969 if (thresh < 2 * wb_stat_error()) in wb_over_bg_thresh()
1974 if (reclaimable > thresh) in wb_over_bg_thresh()
1988 thresh = wb_calc_thresh(mdtc->wb, mdtc->bg_thresh); in wb_over_bg_thresh()
1989 if (thresh < 2 * wb_stat_error()) in wb_over_bg_thresh()
1994 if (reclaimable > thresh) in wb_over_bg_thresh()