Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3856840ybl; Tue, 21 Jan 2020 08:17:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyldqarzNUHP+Eafl/oEVOfwgXZFEmVT/0FBnI4wqhYXGtK5OZJtiRtv7dR68U8xQ8wQLNB X-Received: by 2002:a9d:588d:: with SMTP id x13mr4043599otg.6.1579623437688; Tue, 21 Jan 2020 08:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579623437; cv=none; d=google.com; s=arc-20160816; b=q87sSHastyhCB5ZDFlKhyxyHcLqnze2vIoesGkm1NBM0wwdC2IDRNfd/8NhVygOoS5 zZF3zM49SYREjkOxC8VTNvjg4blHWC5EiFATVftgk4gSb5WY95tKxEHhQCQzRG0fd8PX 3tkxo2qsxlNjj0+E5EkkYKlaNLw51g3lslen+1ytcYpLsVDAQPQ+kd9uRXkW5vgnEGTA YVPphz0kYe/qlQSLuS7KLx0P4uYjZR0YdaxozSeqjTN9XUn6cbZeoM9sUGbnPQHcFFhm 3JG1wRLI0+3Fjlx1su05IJ3+82L2RX7RgD2ZiBBxn+3m8BU10CAQmUjc045dk5dSGov2 bL7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vIXjiWyLhkvXZ5jit4Zp9FqiMWC/lK9etnF5GqL2HKk=; b=jd7MKELj1lTP5iA0FvlLE4/tdXgFRuvj/vDJrVJl9tGjtBh/RXzR7ZOCBPrXU5P5DK j2vl/PYsV6eajCahQ6o08yD+YWO/boKt8Z+nBt9MsMjMcIXUBJt7aCMMaXVWU9JYSfEp 3zgOCUD9kgKuH6dOtw8A8q7MdH5CRRIucxiLwn3FxCNcZxAyNF7IC4lMQ8HSMZrVUAFr Xv7pCMcntYXmwkl/iLU5v3O1x+vFytSaDPGQfYeQYwRVlQsgpBaIAH1iXMVojXz0zoGR L2NYKOwQn5GzzHIcglMGhwpK9l/g4TB/RSZ2gishEWuReZ7mh4k2pCXHpLTvy8S3CEVj TrDQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si19804277oie.20.2020.01.21.08.17.05; Tue, 21 Jan 2020 08:17:17 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729262AbgAUQQF (ORCPT + 99 others); Tue, 21 Jan 2020 11:16:05 -0500 Received: from mga18.intel.com ([134.134.136.126]:19468 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728829AbgAUQQF (ORCPT ); Tue, 21 Jan 2020 11:16:05 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 08:16:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,346,1574150400"; d="scan'208";a="374634490" Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 21 Jan 2020 08:16:04 -0800 Received: from [10.125.249.87] (rsudarik-mobl.ccr.corp.intel.com [10.125.249.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id C80C35803C5; Tue, 21 Jan 2020 08:16:00 -0800 (PST) Subject: =?UTF-8?Q?Re=3a_=5bPATCH_v4_2/2=5d_perf_x86=3a_Exposing_an_Uncore_u?= =?UTF-8?Q?nit_to_PMON_for_Intel_Xeon=c2=ae_server_platform?= To: Greg KH , Andi Kleen Cc: peterz@infradead.org, 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, kan.liang@linux.intel.com, alexander.antonov@intel.com References: <20200117133759.5729-1-roman.sudarikov@linux.intel.com> <20200117133759.5729-3-roman.sudarikov@linux.intel.com> <20200117141944.GC1856891@kroah.com> <20200117162357.GK302770@tassilo.jf.intel.com> <20200117165406.GA1937954@kroah.com> From: "Sudarikov, Roman" Message-ID: Date: Tue, 21 Jan 2020 19:15:56 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200117165406.GA1937954@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.01.2020 19:54, Greg KH wrote: > On Fri, Jan 17, 2020 at 08:23:57AM -0800, Andi Kleen wrote: >>> I thought I was nice and gentle last time and said that this was a >>> really bad idea and you would fix it up. That didn't happen, so I am >>> being explicit here, THIS IS NOT AN ACCEPTABLE FILE OUTPUT FOR A SYSFS >>> FILE. >> Could you suggest how such a 1:N mapping should be expressed instead in >> sysfs? > I have yet to figure out what it is you all are trying to express here > given a lack of Documentation/ABI/ file :) > > But again, sysfs is ONE VALUE PER FILE. You have a list of items here, > that is bounded only by the number of devices in the system at the > moment. That number will go up in time, as we all know. So this is > just not going to work at all as-is. > > greg k-h Hi Greg, Technically, the motivation behind this patch is to enable Linux perf tool to attribute IO traffic to IO device. Currently, perf tool provides interface to configure IO PMUs only without any context. 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. Please consider the following mapping schema: 1. new "mapping" directory is to be added under each uncore_iio_N directory 2. that "mapping" directory is supposed to contain symlinks named "dieN" which are pointed to corresponding root bus. Below is how it looks like for 2S machine: # ll uncore_iio_0/mapping/ lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 -> ../../pci0000:00/pci_bus/0000:00 lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 -> ../../pci0000:80/pci_bus/0000:80 # ll uncore_iio_1/mapping/ lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 -> ../../pci0000:17/pci_bus/0000:17 lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 -> ../../pci0000:85/pci_bus/0000:85 # ll uncore_iio_2/mapping/ lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 -> ../../pci0000:3a/pci_bus/0000:3a lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 -> ../../pci0000:ae/pci_bus/0000:ae # ll uncore_iio_3/mapping/ lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 -> ../../pci0000:5d/pci_bus/0000:5d lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 -> ../../pci0000:d7/pci_bus/0000:d7 Thanks, Roman