Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp408459pxv; Thu, 24 Jun 2021 10:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6FudS3xPZaMS57vrttuKo5QRwg8hQYpEKlt+xOXJ6mSrVkXqCVW8OKaYTOGkVSXBgj+ij X-Received: by 2002:a02:c6ae:: with SMTP id o14mr5777819jan.73.1624555840712; Thu, 24 Jun 2021 10:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624555840; cv=none; d=google.com; s=arc-20160816; b=kUAx2Lua9nsT/ctUe9EtkfIMc+QDAtKbc5DystbszD/aGWKYAYmNhC2FL6zXsJlGx/ iepoDxEjU3ElM/r9/aH05VgR5PDhFyKhPScals6JdM1GWIcBkqX806vLY4gfEtL3WbtN i2q5FspZ7WrtNmuoNyc7Q3zURY09FW+MBobVdHcNn0Q2gTrW4rfJxdlQj1lOeF4sJ/Qm Sa9fPhtvn3/dmayLBb/gQQIUkxQFCdSGFsvJdEgn4xCeu3nXsx/3yc3fL10ku4YWZAFO N2gSAvD1lENDB6mQNi/kxkM/UPsnwc7mrLLb6iPtkcX5oziesRqE4zAene7S+QQHe+oX wpZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=+7oGZyt3anqJ+Jym+iFuk8IfgOhu5DMFDi6sU+uxCV0=; b=DOVW1m0gbQwdGQqvNeuikdQ2ksc83g5TvpCF44w3O6MpCToQ3EP1tbQmixt3tOr453 unA/2kAtP7fO5sOS8oalkHXLsOZNc9O+hE7Bh7TcSqAJJeonyHw43MEpjD39bnPOkSiI 5J/m9h7+aJI8j2eD0YNAA1btC3AjpAg+y27aJNJ/jqriSK6Msu5O016HIIr3j16UcoFy DUoIEvMTUf8qca12uXnk6HDBVXvzS9rfDk8krC8u6qEzxyKDBF++jUv5485lCOsvD8xC XiAywTyI1kk3YKy1CQdyyhwNCtbRcVmUNUaqOIjuVElcXTHuZotmb1JyV8J/gexGC0Az NXBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u4si4368940jak.4.2021.06.24.10.30.28; Thu, 24 Jun 2021 10:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232243AbhFXRbA (ORCPT + 99 others); Thu, 24 Jun 2021 13:31:00 -0400 Received: from mga06.intel.com ([134.134.136.31]:15611 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231895AbhFXRa5 (ORCPT ); Thu, 24 Jun 2021 13:30:57 -0400 IronPort-SDR: zxY2z98lR9Q6OOYBZOjzUsb871GI4+A5+gauT4TsqSr3CvgdiOKtzwqBWMga5pFwadPPzpXFGn kcmdCUXJ6xvw== X-IronPort-AV: E=McAfee;i="6200,9189,10025"; a="268655974" X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="268655974" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 10:28:37 -0700 IronPort-SDR: pfqi8IyNc1kLyRraXJy4cf9ux2sSSTnXkaeEdhiUSIjkj6PPI7+6RdoFYzxCrJM1FD11phBTSK FnpIf0hZm45A== X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="406715603" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.74.185]) ([10.209.74.185]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 10:28:36 -0700 Subject: Re: [PATCH 2/7] perf: Create a symlink for a PMU To: Greg KH 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 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> From: Andi Kleen Message-ID: <29d5f315-578f-103c-9523-ae890e29c7e7@linux.intel.com> Date: Thu, 24 Jun 2021 10:28:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > But this is NOT how busses work in the driver model. > > PCI classes are great, but we do NOT suddenly add a symlink in sysfs if > a driver goes from being handled by "generic_pci_type_foo" to > "vendor_foo". Userspace can handle the change and life goes on. In perf this is exposed to the user command line, and lots of people configure their own events, so it's very common in scripts. To use the pmu you have to use something like perf stat -a -e uncore_foo/.../. So it's not a single thing that could be patched up. The perf tools supports PMUs abstractly and doesn't have special handling for every PMU. Also the perf design was always that the kernel should provide these abstractions with the user tool being (mostly) generic and abstract. > So a device name will move from "generic" to "specific", right? > > Why does a bus have to do with any of this? The perf pmus are in /sys/devices, so the symlinks for compatibility have to be created there. > 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. -Andi