Lines Matching refs:thresh
134 unsigned long thresh; /* dirty threshold */ member
386 unsigned long thresh; in domain_dirty_limits() local
411 thresh = DIV_ROUND_UP(bytes, PAGE_SIZE); in domain_dirty_limits()
413 thresh = (ratio * available_memory) / PAGE_SIZE; in domain_dirty_limits()
423 thresh += thresh / 4 + global_wb_domain.dirty_limit / 32; in domain_dirty_limits()
429 if (thresh > UINT_MAX) in domain_dirty_limits()
430 thresh = UINT_MAX; in domain_dirty_limits()
432 if (bg_thresh >= thresh) in domain_dirty_limits()
433 bg_thresh = thresh / 2; in domain_dirty_limits()
434 dtc->thresh = thresh; in domain_dirty_limits()
439 trace_global_dirty_state(bg_thresh, thresh); in domain_dirty_limits()
458 *pdirty = gdtc.thresh; in global_dirty_limits()
843 static unsigned long dirty_freerun_ceiling(unsigned long thresh, in dirty_freerun_ceiling() argument
846 return (thresh + bg_thresh) / 2; in dirty_freerun_ceiling()
850 unsigned long thresh) in hard_dirty_limit() argument
852 return max(thresh, dom->dirty_limit); in hard_dirty_limit()
923 unsigned long thresh) in __wb_calc_thresh() argument
938 wb_thresh = (thresh * (100 * BDI_RATIO_SCALE - bdi_min_ratio)) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
944 wb_thresh += (thresh * wb_min_ratio) / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
953 if (thresh > dtc->dirty) { in __wb_calc_thresh()
955 wb_thresh = max(wb_thresh, (thresh - dtc->dirty) / 100); in __wb_calc_thresh()
957 wb_thresh = max(wb_thresh, (thresh - dtc->dirty) / 8); in __wb_calc_thresh()
960 wb_max_thresh = thresh * wb_max_ratio / (100 * BDI_RATIO_SCALE); in __wb_calc_thresh()
967 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh) in wb_calc_thresh() argument
972 return __wb_calc_thresh(&gdtc, thresh); in wb_calc_thresh()
984 return __wb_calc_thresh(&mdtc, mdtc.thresh); in cgwb_calc_thresh()
1097 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_position_ratio()
1098 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_position_ratio()
1216 if (unlikely(wb_thresh > dtc->thresh)) in wb_position_ratio()
1217 wb_thresh = dtc->thresh; in wb_position_ratio()
1222 x = div_u64((u64)wb_thresh << 16, dtc->thresh | 1); in wb_position_ratio()
1232 span = (dtc->thresh - wb_thresh + 8 * write_bw) * (u64)x >> 16; in wb_position_ratio()
1311 unsigned long thresh = dtc->thresh; in update_dirty_limit() local
1317 if (limit < thresh) { in update_dirty_limit()
1318 limit = thresh; in update_dirty_limit()
1327 thresh = max(thresh, dtc->dirty); in update_dirty_limit()
1328 if (limit > thresh) { in update_dirty_limit()
1329 limit -= (limit - thresh) >> 5; in update_dirty_limit()
1368 unsigned long freerun = dirty_freerun_ceiling(dtc->thresh, dtc->bg_thresh); in wb_update_dirty_ratelimit()
1369 unsigned long limit = hard_dirty_limit(dtc_dom(dtc), dtc->thresh); in wb_update_dirty_ratelimit()
1590 unsigned long thresh) in dirty_poll_interval() argument
1592 if (thresh > dirty) in dirty_poll_interval()
1593 return 1UL << (ilog2(thresh - dirty) >> 1); in dirty_poll_interval()
1710 dtc->wb_thresh = __wb_calc_thresh(dtc, dtc->thresh); in wb_dirty_limits()
1711 dtc->wb_bg_thresh = dtc->thresh ? in wb_dirty_limits()
1712 div_u64((u64)dtc->wb_thresh * dtc->bg_thresh, dtc->thresh) : 0; in wb_dirty_limits()
1736 unsigned long dirty, thresh; in domain_poll_intv() local
1740 thresh = dtc->wb_thresh; in domain_poll_intv()
1743 thresh = dtc->thresh; in domain_poll_intv()
1746 return dirty_poll_interval(dirty, thresh); in domain_poll_intv()
1761 unsigned long dirty, thresh, bg_thresh; in domain_dirty_freerun() local
1766 thresh = dtc->wb_thresh; in domain_dirty_freerun()
1770 thresh = dtc->thresh; in domain_dirty_freerun()
1773 dtc->freerun = dirty <= dirty_freerun_ceiling(thresh, bg_thresh); in domain_dirty_freerun()
1809 ((dtc->dirty > dtc->thresh) || strictlimit); in wb_dirty_exceeded()
1965 sdtc->thresh, in balance_dirty_pages()
1994 sdtc->thresh, in balance_dirty_pages()