From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C123C2B9F4 for ; Fri, 25 Jun 2021 14:38:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33DE261983 for ; Fri, 25 Jun 2021 14:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231649AbhFYOlB (ORCPT ); Fri, 25 Jun 2021 10:41:01 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:48243 "EHLO wnew1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231720AbhFYOku (ORCPT ); Fri, 25 Jun 2021 10:40:50 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id DB5672B00B1C; Fri, 25 Jun 2021 10:38:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 25 Jun 2021 10:38:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=GpArqP1e/0nk1yUO/CK1bfXcmbJ DmDt6zrZYry34CYg=; b=laRCk6YGSWR+NltLSDAJJORGewwhgzptyaZL5oNt+R3 wfoLMGQo8IN0Ok5LKL+fKI63BIWNxcnZdUN9Dxi1vbXgmYX8XC0LpjLnwEVo5D2u HU0FJtJnmh7e/+PpTZqRLj0Hrs8bHUbgyWnejUbT7vGIltTdGl/woIkjNDYs8q1W Cvut3UNvyo/PGAptO6SZeAbZ1HkFLckoSjbv123KznNzq3VO3hohwxbamY2c+nSw NXBgwUWCDpEhyu7RDVoo/xoawRY6sB+/U7SEHWNJ8SJf9xOJTbKqZVgLcRYG5XIB y4fTHtqUOoioxzhYyRj/Y+xaD/6/cvUdu2aYiEoTMAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GpArqP 1e/0nk1yUO/CK1bfXcmbJDmDt6zrZYry34CYg=; b=u59MrQSJbB0JOaU+UgLtZL Num87Gm8S4YlxGZjycbmbHz+k0M+QGj02s9kTvseUGuqkjr48aNDci1bqBpvN5e9 +HQjSB+97sl2uVnMLucTe2xb1TPx+fJ0jQ3pAg1gr+LQKG0K2pDe4T3XphUZ5mjT IjDTfHP1If5rLwdkCqX2f3zuSKv43g7XlwIyMHEsr8sJarXlIyFEmghZr//SMniQ lq+BjkJ9Wa/H88CF3vpjaMQsEVeKD70gOVyz51i9gvxdq+ZL9aYUznfnyNj0o1wa /rQ7y93XIL/Mf1c+CC99OdyjeOKXC7BM9W+09U8lCZbH4Gse9N+q/aYr5QnyFoiA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeegjedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Jun 2021 10:38:26 -0400 (EDT) Date: Fri, 25 Jun 2021 16:38:23 +0200 From: Greg KH To: Andi Kleen Cc: kan.liang@linux.intel.com, peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, namhyung@kernel.org, acme@kernel.org, jolsa@redhat.com Subject: Re: [PATCH 2/7] perf: Create a symlink for a PMU Message-ID: References: <1624497729-158864-1-git-send-email-kan.liang@linux.intel.com> <1624497729-158864-3-git-send-email-kan.liang@linux.intel.com> <1e536604-cf93-0f09-401e-2073924c5582@linux.intel.com> <29d5f315-578f-103c-9523-ae890e29c7e7@linux.intel.com> <540d8a38-da12-56c8-8306-8d3d61ae1d6b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <540d8a38-da12-56c8-8306-8d3d61ae1d6b@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 25, 2021 at 07:22:08AM -0700, Andi Kleen wrote: > > On 6/24/2021 10:19 PM, Greg KH wrote: > > On Thu, Jun 24, 2021 at 10:28:36AM -0700, Andi Kleen wrote: > > > > But a driver does not caer. And if perf does not care, who cares? > > > The users who write scripts that specify the perf events on the perf command > > > line. > > Great, then as you have deemed the device name part of your documented > > api, then keep it stable as that is what you decided to do a long time > > ago when it was created. > > The fully supported driver keeps it stable, but the driver in fallback mode > (as in running on a yet unknown system) can't because it doesn't have enough > information. It has to fall back to the numeric identifiers. > > Supporting yet unknown systems is a big advantage, missing full kernel > support is the number one reason people can't use uncore monitoring today. > > The symlink keeps some degree of compatibility between the two. But it creates something that is not needed at the moment, and then userspace will rely on it. Don't make userspace rely on it today and all should be fine. Device names will change, that's always a given, as the kernel can never always make them the same. That's why userspace needs to scan the bus for all devices and then pick out the one that it wants to look at. Don't hard-encode device names into userspace tools, that way lies madness. > Anyways thinking about it if Greg doesn't want symlinks (even though sysfs > already has symlinks elsewhere), maybe we could just create two devices > without symlinks. Kan, do you think that would work? Do not have 2 different structures represent the same hardware device, that too is a shortcut to madness. What prevents userspace from handling device names changing today? Why are you forcing userspace to pick a specific device name at all? thanks, greg k-h