Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9099128ybl; Fri, 17 Jan 2020 06:21:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwLyXB4wd5TY+h+vkliG6NvBbxZwWkHznj2wjlVFVJUUpfAcX51la9zyAGqLJyANzIn1F4F X-Received: by 2002:a05:6830:139a:: with SMTP id d26mr6379320otq.75.1579270879152; Fri, 17 Jan 2020 06:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579270879; cv=none; d=google.com; s=arc-20160816; b=R+NKtD57zboSo+FPgI8hRL/eKDdK51DGU1w243PnwpaS3iNxIClEFmlf3Ot7K24WK1 dM+cxD2uvaG3FfDbzLJobtOMUX0To8U/UC8ecTc8LJaVroc+qcEDHZE6Cce9cA4i6PQb AAim7YN0xMoMSBU+xQ9Ptbj5GLubaRVd3AFZsJKdL4DnpFpRwW+AO9QNEBZkgEtTYT48 U8Hs6YwtYW/yw6jrllOKURmpTeqZTX7EbvU5UKXbgxenoj2LaL0xgCNncHIvc0hffsDE iHqx+u1vwCVHVun3e+QyeQpJ4QTDRGGQrj0LGehLeooq9Zb2mYwbpLdA+KzsO3SkQowE RFBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qxbtov59/IoEQMUocoGLBjegBUxjHpei/OuBGB/zH/A=; b=PdwORJbo14jBtiN1uwEZDzFaEz/WT8EBlf1u9mKrHm9a2i6uGuFbGeV2pOhm4dN7mB WbWOCT6X66jqnmNB0f/3VRXT4USUbiI+l9yUCcp9bK1TN53xTPc2LAxhm9L0w4wkz4hK wAw5vPeeRJOlmw8bT1TyfnoOhL6vNPpmEhzmMb68tYm+34LtsY88YeWmQ0PhL4liZnbG BrnH8yAEM7R/e+WoEGz2buRYOsEaSHxs4vEsNlLx2yvOvXW90sRF5FCVKH2EOoYC5/v2 5h8QXTxHXlR6sDZUKJi3IZoewxNBasoUkiS8VT9oydMunOclK5fItAIeFCruHRz2mpw4 MH6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+JU9uif; 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 d5si13411368oij.139.2020.01.17.06.21.07; Fri, 17 Jan 2020 06:21:19 -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=pass header.i=@kernel.org header.s=default header.b=V+JU9uif; 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 S1728739AbgAQOTr (ORCPT + 99 others); Fri, 17 Jan 2020 09:19:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:45636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbgAQOTq (ORCPT ); Fri, 17 Jan 2020 09:19:46 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F16222083E; Fri, 17 Jan 2020 14:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579270786; bh=1UnnLVeZLQ92n1ChKZKfzqxzORKBkvv2IdXh/d6Tjtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V+JU9uifUr2pX71XOyHKwMwqhUHm15/TeXVe5lmGSBQDEKcGI4TdOV0kZAk6dCYZP Sg1ZpVsOAHmBZGyZKmiFplF0fHf3M/uvaH8IKqwiqkg5mMMGnWFCx10jp4mrczdBUT 6WQWU/M9+xVedGO4KY55CKe/wt7mtWsNd7/kEHSs= Date: Fri, 17 Jan 2020 15:19:44 +0100 From: Greg KH To: roman.sudarikov@linux.intel.com 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, ak@linux.intel.com, kan.liang@linux.intel.com, alexander.antonov@intel.com Subject: Re: [PATCH v4 2/2] perf =?iso-8859-1?Q?x86?= =?iso-8859-1?Q?=3A_Exposing_an_Uncore_unit_to_PMON_for_Intel_Xeon?= =?iso-8859-1?Q?=AE?= server platform Message-ID: <20200117141944.GC1856891@kroah.com> References: <20200117133759.5729-1-roman.sudarikov@linux.intel.com> <20200117133759.5729-3-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: <20200117133759.5729-3-roman.sudarikov@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 17, 2020 at 04:37:59PM +0300, roman.sudarikov@linux.intel.com wrote: > From: Roman Sudarikov > > 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. > > IIO stack to PMON mapping is exposed through: > /sys/devices/uncore_iio_/mapping > in the following format: domain:bus > > For example, on a 4-die Intel Xeon? server platform: > $ cat /sys/devices/uncore_iio_0/mapping > 0000:00,0000:40,0000:80,0000:c0 Again, horrible format, why do we have to parse this in userspace like this? Who will use this file? What do they really need? And what happens when you have too many "dies" in a system and you overflow the sysfs file? We have already seen this happen for other sysfs files that assumed "oh, we will never have that many cpus/leds/whatever in a system at one time" and now they have to go do horrid hacks to get around the PAGE_SIZE limitation of sysfs files. DO NOT DO THIS! 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. greg k-h