Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698125

Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads
Date 2017-07-27 18:00 +0200
Message-ID <u7TmG-7Yc-27@gated-at.bofh.it> (permalink)
References <u7T3j-7P8-7@gated-at.bofh.it> <u7T3j-7P8-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 17:40 +0200
  Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 18:00 +0200
  Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-07-29 11:20 +0200
    Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-30 17:30 +0200
      Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-07-31 10:40 +0200
  Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads kbuild test robot <lkp@intel.com> - 2017-07-29 15:40 +0200

csiph-web