[PATCH 3/3] mm: memdelay: drop IO as productive time

From: Johannes Weiner
Date: Thu Sep 28 2017 - 13:36:39 EST


Counting IO as productive time distorts the sense of pressure with
workloads that are naturally IO-bound. Memory pressure can cause IO,
and thus cause "productive" IO to slow down - yet we don't attribute
this slowdown properly to a shortage of memory.

Disregard IO time altogether, and use CPU time alone as the baseline.

Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
---
mm/memdelay.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/memdelay.c b/mm/memdelay.c
index ea5ede79f044..fbce1d4ba142 100644
--- a/mm/memdelay.c
+++ b/mm/memdelay.c
@@ -113,12 +113,11 @@ static void domain_cpu_update(struct memdelay_domain *md, int cpu,
* one running the workload, the domain is considered fully
* blocked 50% of the time.
*/
- if (mdc->tasks[MTS_DELAYED_ACTIVE] && !mdc->tasks[MTS_IOWAIT])
+ if (mdc->tasks[MTS_DELAYED_ACTIVE])
state = MDS_FULL;
else if (mdc->tasks[MTS_DELAYED])
- state = (mdc->tasks[MTS_RUNNABLE] || mdc->tasks[MTS_IOWAIT]) ?
- MDS_PART : MDS_FULL;
- else if (mdc->tasks[MTS_RUNNABLE] || mdc->tasks[MTS_IOWAIT])
+ state = mdc->tasks[MTS_RUNNABLE] ? MDS_PART : MDS_FULL;
+ else if (mdc->tasks[MTS_RUNNABLE])
state = MDS_NONE;
else
state = MDS_IDLE;
--
2.14.2


--0F1p//8PRICkK4MW--