Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1618588ybl; Mon, 2 Dec 2019 06:04:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxIURmbsl84rRXuZCaPqzObNrHxYB6Tix+6TbLESX1ZqCHDyp2REvNe4eFqaZd5QP5+R60m X-Received: by 2002:a05:620a:147c:: with SMTP id j28mr11291277qkl.13.1575295458269; Mon, 02 Dec 2019 06:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575295458; cv=none; d=google.com; s=arc-20160816; b=wWQUor09HWuambgWgjQHYR7BRBnD3kSuVXOO3g25bEULvAIPk9F4xWNxY+J+hLKTw+ FNJoISJHNQf90vgNR2RnUhvDYW4QqQsKXMoNQwl1qqNZxKW87HXsvBJe/5SR/Kibxh3Z 6A7YuiNC6pM6HVn3vtlh4yuuC2Tm3qlgAhTKI63TikQ5n03Wi1hGF3y3HF/W0D5oXBxi agHoFQy+B+ZL2SnlzKcWdyXlTXpvgioU80CeTcwz98P3xKxMTk1ym3hmf1Wn3STVN/xS 2DhEuINCk68G/aS9TC0x94VutGQGQbC3ytUc0vZ7idFvwtQ52z7EhUH5lFfh6NJntNYe G25Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=93Mq4hGdwdZNtTVNb7h07FqV5Mx6ZBkun/PInhPUvK4=; b=jX8vBexTr8aM3EakPqtOA5qcpRnukfcVKcLURqn42b8EClyHO443DY/rb05+wN5yMa k/Ogchi/93umKa/pFHBXzTG59oH6BkQhdbP1G6/qWwjWezoipUjw+8X5leOcmC6FPnbE uAH/vs8YQXzrlt33iHWEMkhXrpndZXlQ0gzdF5GqJI82K6tRgxDOGySzl2jH+jily1Dw lmtKoHBInfueH84zAQaiYM/djxxGH/dUQUrYgJ7qY0aUgg+ICRbOR2mTytCtZ/qZkrWB VBmscGqL/2WqTFlCj+b1AaE/7LcRHSFoyKN9pg5h1opqzk8Jsm9tEtO1rtj8gjELnfTo 03ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qaYV4IDk; 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 y29si21650603qtm.385.2019.12.02.06.03.15; Mon, 02 Dec 2019 06:04:18 -0800 (PST) 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=bombadil.20170209 header.b=qaYV4IDk; 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 S1727431AbfLBOBQ (ORCPT + 99 others); Mon, 2 Dec 2019 09:01:16 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36776 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727362AbfLBOBP (ORCPT ); Mon, 2 Dec 2019 09:01:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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=93Mq4hGdwdZNtTVNb7h07FqV5Mx6ZBkun/PInhPUvK4=; b=qaYV4IDkSUmBBTbEa4wLLu5/Fo OJsXD57aGELBrcxhoAXSne5BvxwEZatEnO6wELplNpLRJceBEgXrLqUdwk33crjIoaauEv3QndcDz IiLZvn+IMAmSMiNQEB/Pvzbt6UQygwx5m6k+v4PCIPxVeM3D66dPRd1MmuyKPmgzxwi5Sc7YcUy4l RWAHelsytXAs80uW6C0sq+myEhjnnJTXouudhPqqsoHqC0WwtQEdDTpW9j3T+PjZ7BB1lKQ0CA5BB aDZ9f3f3y031J4P8+4vhRPXrCbyTHcK6nteiWTdgux+BeR+38yFSWIJKz1JmYY4ESAYI8EYk8kYsn ovEbaKIA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibmG7-0005BI-Go; Mon, 02 Dec 2019 14:01:03 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4D04C3006E3; Mon, 2 Dec 2019 14:59:44 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0CC89201A401D; Mon, 2 Dec 2019 15:01:00 +0100 (CET) Date: Mon, 2 Dec 2019 15:00:59 +0100 From: Peter Zijlstra To: roman.sudarikov@linux.intel.com Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, bgregg@netflix.com, ak@linux.intel.com, kan.liang@linux.intel.com, alexander.antonov@intel.com Subject: Re: [PATCH 1/6] perf x86: Infrastructure for exposing an Uncore unit to PMON mapping Message-ID: <20191202140059.GL2844@hirez.programming.kicks-ass.net> References: <20191126163630.17300-1-roman.sudarikov@linux.intel.com> <20191126163630.17300-2-roman.sudarikov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191126163630.17300-2-roman.sudarikov@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 26, 2019 at 07:36:25PM +0300, roman.sudarikov@linux.intel.com wrote: > From: Roman Sudarikov > > Intel? Xeon? Scalable processor family (code name Skylake-SP) makes significant > changes in the integrated I/O (IIO) architecture. The new solution introduces > IIO stacks which are responsible for managing traffic between the PCIe domain > and the Mesh domain. Each IIO stack has its own PMON block and can handle either > DMI port, x16 PCIe root port, MCP-Link or various built-in accelerators. > IIO PMON blocks allow concurrent monitoring of I/O flows up to 4 x4 bifurcation > within each IIO stack. > > Software is supposed to program required perf counters within each IIO stack > and gather performance data. The tricky thing here is that IIO PMON reports data > per IIO stack but users have no idea what IIO stacks are - they only know devices > which are connected to the platform. > > Understanding IIO stack concept to find which IIO stack that particular IO device > is connected to, or to identify an IIO PMON block to program for monitoring > specific IIO stack assumes a lot of implicit knowledge about given Intel server > platform architecture. > > This patch set introduces: > An infrastructure for exposing an Uncore unit to Uncore PMON mapping through sysfs-backend > A new --iiostat mode in perf stat to provide I/O performance metrics per I/O device > > Current version supports a server line starting Intel? Xeon? Processor Scalable > Family and introduces mapping for IIO Uncore units only. > Other units can be added on demand. > > Usage example: > /sys/devices/uncore__/platform_mapping > > Each Uncore unit type, by its nature, can be mapped to its own context, for example: > CHA - each uncore_cha_ is assigned to manage a distinct slice of LLC capacity > UPI - each uncore_upi_ is assigned to manage one link of Intel UPI Subsystem > IIO - each uncore_iio_ is assigned to manage one stack of the IIO module > IMC - each uncore_imc_ is assigned to manage one channel of Memory Controller > > Implementation details: > Two callbacks added to struct intel_uncore_type to discover and map Uncore units to PMONs: > int (*get_topology)(struct intel_uncore_type *type) > int (*set_mapping)(struct intel_uncore_type *type) > > IIO stack to PMON mapping is exposed through > /sys/devices/uncore_iio_/platform_mapping > in the following format: domain:bus > > Details of IIO Uncore unit mapping to IIO PMON: > Each IIO stack is either a DMI port, x16 PCIe root port, MCP-Link or various > built-in accelerators. For Uncore IIO Unit type, the platform_mapping file > holds bus numbers of devices, which can be monitored by that IIO PMON block > on each die. > > For example, on a 4-die Intel Xeon? server platform: > $ cat /sys/devices/uncore_iio_0/platform_mapping > 0000:00,0000:40,0000:80,0000:c0 > > Which means: > IIO PMON block 0 on die 0 belongs to IIO stack located on bus 0x00, domain 0x0000 > IIO PMON block 0 on die 1 belongs to IIO stack located on bus 0x40, domain 0x0000 > IIO PMON block 0 on die 2 belongs to IIO stack located on bus 0x80, domain 0x0000 > IIO PMON block 0 on die 3 belongs to IIO stack located on bus 0xc0, domain 0x0000 > > Signed-off-by: Roman Sudarikov > Co-developed-by: Alexander Antonov > Signed-off-by: Alexander Antonov Kan, can you help these people? There's a ton of process fail with this submission. From SoB chain to CodingStyle to git-sendmail threading.