Lines Matching full:scanned

25  * The window size (vmpressure_win) is the number of scanned pages before
26 * we try to analyze scanned/reclaimed ratio. So the window is used as a
42 * scanned/reclaimed ratio. The current values were chosen empirically. In
121 static enum vmpressure_levels vmpressure_calc_level(unsigned long scanned, in vmpressure_calc_level() argument
124 unsigned long scale = scanned + reclaimed; in vmpressure_calc_level()
128 * reclaimed can be greater than scanned for things such as reclaimed in vmpressure_calc_level()
130 * related increment to scanned pages. in vmpressure_calc_level()
132 if (reclaimed >= scanned) in vmpressure_calc_level()
136 * scanned vs. reclaimed in a given time frame (window). Note that in vmpressure_calc_level()
138 * scanned. This makes it possible to set desired reaction time in vmpressure_calc_level()
141 pressure = scale - (reclaimed * scale / scanned); in vmpressure_calc_level()
146 scanned, reclaimed); in vmpressure_calc_level()
184 unsigned long scanned; in vmpressure_work_fn() local
195 * just after the old work returns, but then scanned might be zero in vmpressure_work_fn()
199 scanned = vmpr->tree_scanned; in vmpressure_work_fn()
200 if (!scanned) { in vmpressure_work_fn()
210 level = vmpressure_calc_level(scanned, reclaimed); in vmpressure_work_fn()
220 * vmpressure() - Account memory pressure through scanned/reclaimed ratio
224 * @scanned: number of pages scanned
228 * "instantaneous" memory pressure (scanned/reclaimed ratio). The raw
241 unsigned long scanned, unsigned long reclaimed) in vmpressure() argument
260 * If we got here with no pages scanned, then that is an indicator in vmpressure()
267 if (!scanned) in vmpressure()
272 scanned = vmpr->tree_scanned += scanned; in vmpressure()
276 if (scanned < vmpressure_win) in vmpressure()
287 scanned = vmpr->scanned += scanned; in vmpressure()
289 if (scanned < vmpressure_win) { in vmpressure()
293 vmpr->scanned = vmpr->reclaimed = 0; in vmpressure()
296 level = vmpressure_calc_level(scanned, reclaimed); in vmpressure()
335 * range vmscan. Passing scanned = vmpressure_win, reclaimed = 0 in vmpressure_prio()