Loading mm/vmpressure.c +9 −1 Original line number Diff line number Diff line Loading @@ -149,8 +149,15 @@ static unsigned long vmpressure_calc_pressure(unsigned long scanned, unsigned long reclaimed) { unsigned long scale = scanned + reclaimed; unsigned long pressure; unsigned long pressure = 0; /* * reclaimed can be greater than scanned in cases * like THP, where the scanned is 1 and reclaimed * could be 512 */ if (reclaimed >= scanned) goto out; /* * We calculate the ratio (in percents) of how many pages were * scanned vs. reclaimed in a given time frame (window). Note that Loading @@ -161,6 +168,7 @@ static unsigned long vmpressure_calc_pressure(unsigned long scanned, pressure = scale - (reclaimed * scale / scanned); pressure = pressure * 100 / scale; out: pr_debug("%s: %3lu (s: %lu r: %lu)\n", __func__, pressure, scanned, reclaimed); Loading Loading
mm/vmpressure.c +9 −1 Original line number Diff line number Diff line Loading @@ -149,8 +149,15 @@ static unsigned long vmpressure_calc_pressure(unsigned long scanned, unsigned long reclaimed) { unsigned long scale = scanned + reclaimed; unsigned long pressure; unsigned long pressure = 0; /* * reclaimed can be greater than scanned in cases * like THP, where the scanned is 1 and reclaimed * could be 512 */ if (reclaimed >= scanned) goto out; /* * We calculate the ratio (in percents) of how many pages were * scanned vs. reclaimed in a given time frame (window). Note that Loading @@ -161,6 +168,7 @@ static unsigned long vmpressure_calc_pressure(unsigned long scanned, pressure = scale - (reclaimed * scale / scanned); pressure = pressure * 100 / scale; out: pr_debug("%s: %3lu (s: %lu r: %lu)\n", __func__, pressure, scanned, reclaimed); Loading