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


Groups > linux.kernel > #1700379

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

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
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 Mon, 31 Jul 2017 22:40:01 +0200
Message-ID <u9pDP-2pW-3@gated-at.bofh.it> (permalink)
References <u7T3j-7P8-7@gated-at.bofh.it> <u7T3j-7P8-11@gated-at.bofh.it> <u8w4F-7n-1@gated-at.bofh.it> <u8Ykh-230-7@gated-at.bofh.it> <u9ep4-3Xg-3@gated-at.bofh.it> <u9nVo-1jR-19@gated-at.bofh.it> <u9p17-1XO-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BmepxXN/X4gpy8Un+oK739W5Z+GDeCu/2U4zHHkzv6E=; b=F2vmKu+Y3BnglV3Uk05+UGVxyO 3gkdTJeeCE6x5zRL4o8p0o6x5G/3eBZ1dBYpw2prFtYmN+tP6fszXovRutjy71qBXqeDbv1ixsLNZ Xy4I1FFTPO0kMHc9RSUo4AVi414rDyUiYkDzYVZqVG4To7Jj+v+J0sFJjWFQeEegeI0w=;
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Disposition inline
Content-Transfer-Encoding 8bit
User-Agent Mutt/1.8.3 (2017-05-23)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com
X-Original-Date Mon, 31 Jul 2017 16:38:40 -0400
X-Original-Message-ID <20170731203839.GA5162@cmpxchg.org>
X-Original-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> <1501530579.9118.43.camel@gmx.de>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1700379

Show key headers only | View raw


On Mon, Jul 31, 2017 at 09:49:39PM +0200, Mike Galbraith wrote:
> On Mon, 2017-07-31 at 14:41 -0400, Johannes Weiner wrote:
> > 
> > Adding an rq counter for tasks inside memdelay sections should be
> > straight-forward as well (except for maybe the migration cost of that
> > state between CPUs in ttwu that Mike pointed out).
> 
> What I pointed out should be easily eliminated (zero use case).

How so?

> > That leaves the question of how to track these numbers per cgroup at
> > an acceptable cost. The idea for a tree of cgroups is that walltime
> > impact of delays at each level is reported for all tasks at or below
> > that level. E.g. a leave group aggregates the state of its own tasks,
> > the root/system aggregates the state of all tasks in the system; hence
> > the propagation of the task state counters up the hierarchy.
> 
> The crux of the biscuit is where exactly the investment return lies.
>  Gathering of these numbers ain't gonna be free, no matter how hard you
> try, and you're plugging into paths where every cycle added is made of
> userspace hide.

Right. But how to implement it sanely and optimize for cycles, and
whether we want to default-enable this interface are two separate
conversations.

It makes sense to me to first make the implementation as lightweight
on cycles and maintainability as possible, and then worry about the
cost / benefit defaults of the shipped Linux kernel afterwards.

That goes for the purely informative userspace interface, anyway. The
easily-provoked thrashing livelock I have described in the email to
Andrew is a different matter. If the OOM killer requires hooking up to
this metric to fix it, it won't be optional. But the OOM code isn't
part of this series yet, so again a conversation best had later, IMO.

PS: I'm stealing the "made of userspace hide" thing.

Back to linux.kernel | Previous | Next — Previous 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 Johannes Weiner <hannes@cmpxchg.org> - 2017-07-31 20:50 +0200
          Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Mike Galbraith <efault@gmx.de> - 2017-07-31 22:00 +0200
            Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-07-31 22:40 +0200
              Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Mike Galbraith <efault@gmx.de> - 2017-08-01 04:30 +0200
          Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Peter Zijlstra <peterz@infradead.org> - 2017-08-01 10:00 +0200
            Re: [PATCH 3/3] mm/sched: memdelay: memory health interface for  systems and workloads Johannes Weiner <hannes@cmpxchg.org> - 2017-08-01 14:30 +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