From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbdAQMbi (ORCPT ); Tue, 17 Jan 2017 07:31:38 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:56046 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbdAQMbh (ORCPT ); Tue, 17 Jan 2017 07:31:37 -0500 Date: Tue, 17 Jan 2017 13:31:32 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Vikas Shivappa , vikas.shivappa@intel.com, davidcc@google.com, eranian@google.com, linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, mingo@kernel.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, andi.kleen@intel.com, h.peter.anvin@intel.com Subject: Re: [PATCH 05/12] x86/cqm,perf/core: Cgroup support prepare Message-ID: <20170117123132.GB6485@twins.programming.kicks-ass.net> References: <1483740005-23499-1-git-send-email-vikas.shivappa@linux.intel.com> <1483740005-23499-6-git-send-email-vikas.shivappa@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 17, 2017 at 01:11:50PM +0100, Thomas Gleixner wrote: > On Fri, 6 Jan 2017, Vikas Shivappa wrote: > > > From: David Carrillo-Cisneros > > > > cgroup hierarchy monitoring is not supported currently. This patch > > builds all the necessary datastructures, cgroup APIs like alloc, free > > etc and necessary quirks for supporting cgroup hierarchy monitoring in > > later patches. > > > > - Introduce a architecture specific data structure arch_info in > > perf_cgroup to keep track of RMIDs and cgroup hierarchical monitoring. > > - perf sched_in calls all the cgroup ancestors when a cgroup is > > scheduled in. This will not work with cqm as we have a common per pkg > > rmid associated with one task and hence cannot write different RMIds > > into the MSR for each event. cqm driver enables a flag > > PERF_EV_CGROUP_NO_RECURSION which indicates the perf to not call all > > ancestor cgroups for each event and let the driver handle the hierarchy > > monitoring for cgroup. > > - Introduce event_terminate as event_destroy is called after cgrp is > > disassociated from the event to support rmid handling of the cgroup. > > This helps cqm clean up the cqm specific arch_info. > > - Add the cgroup APIs for alloc,free,attach and can_attach > > > > The above framework will be used to build different cgroup features in > > later patches. > > That's not a framework. It's a hodgepodge of core and x86 specific changes. Trainwreck comes to mind. It completely fails to describe semantics of the hacks and how they would preserve the cgroup invariants.