Received: by 10.192.165.148 with SMTP id m20csp5374945imm; Wed, 9 May 2018 04:08:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqyg4xZX4f2gBQXdP9Acn1WaX/l45O7b+iOtU+OWoULHNBIF5kCclJYSzx1XY4RDvHCmHFZ X-Received: by 2002:a17:902:aa98:: with SMTP id d24-v6mr19645825plr.185.1525864107406; Wed, 09 May 2018 04:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525864107; cv=none; d=google.com; s=arc-20160816; b=lmBGCPkgigEmu0ywWy3xbbbmuE2AyLTXypecxtIQQVb74QUa7Q79RDGCI5in33xcQ0 ks34dzQcSmpAGsQTj2MeRWAIsT2KKuuolP1NeDR9cXBagmfmmr6U+wrb8DEi5CAjbAvJ WHXB/GojEnKHNSb498uNxl9XfedGSoWz3cq+g36sMRCc9A51BKJmITbkI0qn+RWuFvSh iBaIy6OA0UbhyR1ONHj2tIAMn1LkkfhMIxmvhDZZmyZ+B6R2FPspjSGVJz8nbZLoyW0L EExjGh8WOZJE304JFK5YKerTuVvlBQKsk9daEw2/lt62+qYUMLnG3dynYW5z5Tlt8yya oYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=xX5O3OJZMsmfN6VJxR/1SPgfO3nJlLBQq4GICQvYF7I=; b=c9j/L7xcVAsA7w7z1j5uilkrLtIv9Fefp8wxNDnQD/0WKnuWxI9SXmz7D1rWm5A7hT jaGmxaJbgXbBduidwPOrnKzbf0JBUbTkTrokH72uGPM9fHcONg01JyyPi6tTGPWVPBUh lx/J0iW8Gha+R+O16CojjtKUmE3QxjdCjO32EkJQ039w8wJOTVIc5e+wKpyixa/jLn02 OXo5ABzjcLMj7mqT5ERUE5QSAxgO8hIoQfkx0ccU7TUvYnNstxGtbb5/DUb4rRkB8zX2 uvGMzUpq9KjvQ3B28vKTtRgVOp23JOUmx0huiuOji4MiZNzxV0II0XxHOQhAACpEMexo Iyzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=cY7HYNS1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si21799631plo.465.2018.05.09.04.08.11; Wed, 09 May 2018 04:08:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=cY7HYNS1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934083AbeEILIA (ORCPT + 99 others); Wed, 9 May 2018 07:08:00 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52286 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756022AbeEILH7 (ORCPT ); Wed, 9 May 2018 07:07:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=xX5O3OJZMsmfN6VJxR/1SPgfO3nJlLBQq4GICQvYF7I=; b=cY7HYNS14WHbD63ePBp1l9FBX UwTMlxoT5i7a1UDI32kfCzAwx4rZ9RPcihJuxCgcx+AM8JEW1dH/rgv8dNFIn1JbaD9WgNhxAqhfx uDUYNZKmIZFKUy6F3EbshoNm/QXK5aJZI4nzaatWiz0zKrKJdjY/VorkJqcPIpZTi1aSOzXd8xSFa V4gsbbzHMnjIah7F4z0RaXhk8pfJfV+Z55ShB4fnwxab9Np/4tzYTMY8BKDnmn9DVFYEbUSf6VZkt VYXdGTn9wsyYyUFrR0XKLs5jclmoI4lMawtjzDfw5eJ+ATzMtSvQftQPRBm0pzIFZDwNiPfrOnJTI 0W+hrryfw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGMwd-0007Rd-EZ; Wed, 09 May 2018 11:07:40 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 141EB2029FA13; Wed, 9 May 2018 13:07:36 +0200 (CEST) Date: Wed, 9 May 2018 13:07:36 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, cgroups@vger.kernel.org, Ingo Molnar , Andrew Morton , Tejun Heo , Balbir Singh , Mike Galbraith , Oliver Yang , Shakeel Butt , xxx xxx , Taras Kondratiuk , Daniel Walker , Vinayak Menon , Ruslan Ruslichenko , kernel-team@fb.com Subject: Re: [PATCH 7/7] psi: cgroup support Message-ID: <20180509110736.GR12217@hirez.programming.kicks-ass.net> References: <20180507210135.1823-1-hannes@cmpxchg.org> <20180507210135.1823-8-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180507210135.1823-8-hannes@cmpxchg.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 07, 2018 at 05:01:35PM -0400, Johannes Weiner wrote: > --- a/kernel/sched/psi.c > +++ b/kernel/sched/psi.c > @@ -260,6 +260,18 @@ void psi_task_change(struct task_struct *task, u64 now, int clear, int set) > task->psi_flags |= set; > > psi_group_update(&psi_system, cpu, now, clear, set); > + > +#ifdef CONFIG_CGROUPS > + cgroup = task->cgroups->dfl_cgrp; > + while (cgroup && (parent = cgroup_parent(cgroup))) { > + struct psi_group *group; > + > + group = cgroup_psi(cgroup); > + psi_group_update(group, cpu, now, clear, set); > + > + cgroup = parent; > + } > +#endif > } TJ fixed needing that for stats at some point, why can't you do the same?