lkml.org 
[lkml]   [2017]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads
On Thu, Jul 27, 2017 at 11:30:10AM -0400, Johannes Weiner wrote:
> + /*
> + * The domain is somewhat delayed when a number of tasks are
> + * delayed but there are still others running the workload.
> + *
> + * The domain is fully delayed when all non-idle tasks on the
> + * CPU are delayed, or when a delayed task is actively running
> + * and preventing productive tasks from making headway.
> + *
> + * The state times then add up over all CPUs in the domain: if
> + * the domain is fully blocked on one CPU and there is another
> + * one running the workload, the domain is considered fully
> + * blocked 50% of the time.
> + */
> + if (!mdc->tasks[MTS_DELAYED_ACTIVE] && !mdc->tasks[MTS_DELAYED])
> + state = MDS_NONE;
> + else if (mdc->tasks[MTS_WORKING])
> + state = MDS_SOME;
> + else
> + state = MDS_FULL;

Just a headsup, if you're wondering why the distinction between
delayed and delayed_active: I used to track iowait separately from
working, and in a brainfart oversimplified this part right here. It
should really be:

if (delayed_active && !iowait)
state = full
else if (delayed)
state = (working || iowait) ? some : full
else
state = none

I'm going to re-add separate iowait tracking in v2 and fix this, but
since this patch is already big and spans two major subsystems, I
wanted to run the overall design and idea by you first before doing
more polishing on this.

\
 
 \ /
  Last update: 2017-07-27 17:57    [W:0.109 / U:20.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site