Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbdHAH5h (ORCPT ); Tue, 1 Aug 2017 03:57:37 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35301 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbdHAH5g (ORCPT ); Tue, 1 Aug 2017 03:57:36 -0400 Date: Tue, 1 Aug 2017 09:57:28 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: Ingo Molnar , Andrew Morton , Rik van Riel , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for systems and workloads Message-ID: <20170801075728.GE6524@worktop.programming.kicks-ass.net> References: <20170727153010.23347-1-hannes@cmpxchg.org> <20170727153010.23347-4-hannes@cmpxchg.org> <20170729091055.GA6524@worktop.programming.kicks-ass.net> <20170730152813.GA26672@cmpxchg.org> <20170731083111.tgjgkwge5dgt5m2e@hirez.programming.kicks-ass.net> <20170731184142.GA30943@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170731184142.GA30943@cmpxchg.org> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 27 On Mon, Jul 31, 2017 at 02:41:42PM -0400, Johannes Weiner wrote: > On Mon, Jul 31, 2017 at 10:31:11AM +0200, Peter Zijlstra wrote: > > So could you start by describing what actual statistics we need? Because > > as is the scheduler already does a gazillion stats and why can't re > > repurpose some of those? > > If that's possible, that would be great of course. > > We want to be able to tell how many tasks in a domain (the system or a > memory cgroup) are inside a memdelay section as opposed to how many And you haven't even defined wth a memdelay section is yet.. > are in a "productive" state such as runnable or iowait. Then derive > from that whether the domain as a whole is unproductive (all non-idle > tasks memdelayed), or partially unproductive (some delayed, but CPUs > are productive or there are iowait tasks). Then derive the percentages > of walltime the domain spends partially or fully unproductive. > > For that we need per-domain counters for > > 1) nr of tasks in memdelay sections > 2) nr of iowait or runnable/queued tasks that are NOT inside > memdelay sections And I still have no clue..