>From ea663e42b24871d370b6ddbfbf47c1775a2f9f09 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Thu, 28 Sep 2017 10:36:39 -0700 Subject: [PATCH 3/3] mm: memdelay: drop IO as productive time 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 --- 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