From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BD641E1A3D for ; Tue, 7 Jan 2025 19:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736277128; cv=none; b=NKuNw+FLWn5EZFu3o1MKH/YFUxzIzT2RkBd/ypoXUPgmA+jwcpBkii8vDIOhRbvuNpezoonlUgcwmjI2dsV5H5iDEBPYtlhnBkQcZKwrP3W8v9QHOR+86NAF4+bE591B4ve/TLBxGCOiQWmDW3K3wZmad/MsGkPwG5v10pVlawA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736277128; c=relaxed/simple; bh=P3HSif9m7nUmoa8TQRe2KOFmuy9yPmdBqRbsSh20zuM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ju9sxlbNRuVvdxoQ9AiEp4sgF4ZbwoCedx8WA1oXU0yMgpnhV2A4tKyNLTQi7rX4LokY5STMRcXHbESPyRv/gdMlgAL5NSa2AWe6kGkNB0G3QXNy63B2gGhSdoxD7LLvI6Vhutc5lpTzJfQ6ojxuyfFCLB7yuZ9Co04Q3lSB8AU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=diQNdhB8; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="diQNdhB8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736277125; x=1767813125; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=P3HSif9m7nUmoa8TQRe2KOFmuy9yPmdBqRbsSh20zuM=; b=diQNdhB8qer/nI1eTY2FtTBrJk9vcBUPvsv0284Rd9k6kw2rx3/e3Dgx gxzeo8+7rYpjRsA/ruzpz4fsBAB09GPyaeus/EGXZ6SA5ad5Er0ne6XPC En8iqrNx1Sh9Bnkp7xFzocs4fJTin0IcIosiyCLba7VwrcR5nLHGVna4l u6djgDXgv2+Qm2imhtx/vbKQOGlFLYGunaElDzODdgZKe/VKAX7PgoXyV HvOrfefNZJxwD17fxvsEIDOOHHVRxe7cUqJwTEhmhDyYrcK/UXTuE/m+N Vo3VZrQxoUx8wcndHsVtLOacBoZfcRBQFQRxjpFbHsiPPSwDVDNNcw1va g==; X-CSE-ConnectionGUID: tsCvDNNHRGij+1EUIxTcww== X-CSE-MsgGUID: h5eL4TNbQbeT484i7VA2GA== X-IronPort-AV: E=McAfee;i="6700,10204,11308"; a="36376552" X-IronPort-AV: E=Sophos;i="6.12,296,1728975600"; d="scan'208";a="36376552" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2025 11:12:03 -0800 X-CSE-ConnectionGUID: kQ1PH+AqR2em24UALgN/ww== X-CSE-MsgGUID: k7HusRIWSguAN4U0obYY+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,296,1728975600"; d="scan'208";a="103348833" Received: from linux.intel.com ([10.54.29.200]) by fmviesa010.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2025 11:12:03 -0800 Received: from [10.246.136.10] (kliang2-mobl1.ccr.corp.intel.com [10.246.136.10]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 1A99120B5713; Tue, 7 Jan 2025 11:12:02 -0800 (PST) Message-ID: <691c84d7-3b3b-4896-a607-09ba7a2263d7@linux.intel.com> Date: Tue, 7 Jan 2025 14:12:00 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] tools lib api cpu: Remove unused file To: Ian Rogers Cc: Arnaldo Carvalho de Melo , Jesper Juhl , Sam James , Namhyung Kim , linux-kernel@vger.kernel.org, Kan Liang References: <20241219205445.103071-1-irogers@google.com> <93124893-836b-4aae-8ca8-323089fcc645@linux.intel.com> Content-Language: en-US From: "Liang, Kan" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2025-01-07 11:01 a.m., Ian Rogers wrote: > On Tue, Jan 7, 2025 at 6:22 AM Liang, Kan wrote: >> >> On 2025-01-06 5:32 p.m., Ian Rogers wrote: >>> On Thu, Dec 19, 2024 at 12:54 PM Ian Rogers wrote: >>>> >>>> No use in tools could be found, remove to simplify the code base. >>>> >> >> This was to support the patch which generate per-sample >> freq/CPU%/CORE_BUSY%. >> https://lore.kernel.org/lkml/1442413316-33518-1-git-send-email-kan.liang@intel.com/ >> >> However, the patch set was not merged. I don't remember the exact reason. >> >> It looks like there is no one interested in it. There should be no >> reason to keep it. >> >> Acked-by: Kan Liang > > Thanks Kan! That series looks nice. There is an overlap with computing > frequencies and metrics like cpu_operating_frequency: > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/sapphirerapids/spr-metrics.json?h=perf-tools-next#n45 > > I wonder two things: > 1) perhaps we can add the --perf-freq flag but make the implementation > use metrics rather than hard coded events. Outside of perf stat the > json metrics aren't really plumbed up, so this would be a bunch of > work. At that time, the metrics was not well supported. Everything is hardcoded. Yes, now, we should utilize the json metrics for it. > 2) the metrics compute the TSC frequency from cpuid, and fall back to > /proc/cpuinfo: > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/arch/x86/util/tsc.c?h=perf-tools-next > Perhaps there should be another fallback to > /sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq, as in this > series. As my understanding, the TSC frequency should be a non-turbo frequency. The cpuinfo_max_freq should be a turbo frequency. It may not be used as a fallback. Thanks, Kan > > Thanks, > Ian