Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp356859ybv; Wed, 19 Feb 2020 00:54:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyZF8CQP5GtWDhBDKpatim5dsMduYLAtWtvRZ4MaV7GrbqwyVGxNmES4fOiM3lqfRTllN0w X-Received: by 2002:a05:6830:12d5:: with SMTP id a21mr19489743otq.296.1582102457576; Wed, 19 Feb 2020 00:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582102457; cv=none; d=google.com; s=arc-20160816; b=nU0y7ZVYgJ0yZgL3jeh0UQdl3FpjMsAmyYBnhyP639KWljKjhxjep9uIZWh3h2aVaP FucE6gd1YOL1SC1PBWVyYZ3NfH5Oi5nqAdWTXk9WNE5NMsN6fQtN6wCrqvo7sHrRb6T9 Z4Zeu+0SZ+6sQch9CiJzdzQWNgDVBgAYQ3pjYYod0vv/Xt1dXNF2jDhcOfQ9TAiyuGZQ C9KeIu7l13Wh8IMKNIRSHC29GUe6GWDgkE8IG3SwEDkF1Ow/U/xIoqzwnCt7p3jkwrco ow/rFcJNZMmAVlS2NvQkmgOkKW8ljVGIDAjGX/lvfRpIzFFHT8A5bWi9uDiTM3IDMSIV Wx5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QqgQ/lSAwEEFmHZBetW6v8g4L60rGsqKMoJMxwPf4qM=; b=hAHRvr3/+y6aaNVEJ08McvWC4KVmvZcMCx1eNe8KL+A5MRlVC20avxhiIhwkhgpuhW 399BOp4jPWC833nmNdSY0zUYUifWIkXgZSQdDsotYJSU7dbkudMCIjrs6UvAJ75KPIGj 1HhVYBbA0kmr8Mve2FFtBlm7Emm8kzYCw3mJu48+OHGNTVK7BMKm6CrVwkzEoKjzi7Jy wVKsDhMWPIzVaZpXz1dVQiXsfOuyeg9hSPdi8i9a+6mH5usPSroS1FH/aeVXywIS18K8 YYF/g6YIMsOVkCg01xDIahd9AClcbE0yX42/K6YvDwWRw2tX2eodJktRAL+FTJgvTVK5 85OA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si751496otj.282.2020.02.19.00.54.04; Wed, 19 Feb 2020 00:54: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726453AbgBSIxw (ORCPT + 99 others); Wed, 19 Feb 2020 03:53:52 -0500 Received: from foss.arm.com ([217.140.110.172]:43928 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbgBSIxw (ORCPT ); Wed, 19 Feb 2020 03:53:52 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5F8441FB; Wed, 19 Feb 2020 00:53:51 -0800 (PST) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D7DD3F68F; Wed, 19 Feb 2020 00:53:49 -0800 (PST) Subject: Re: [RFC] Display the cpu of sched domain in procfs To: Valentin Schneider , Chen Yu , Linux Kernel Mailing List Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Mel Gorman , Tony Luck , Aubrey Li , Tim Chen , Dave Hansen , Borislav Petkov References: <787302f0-670f-fadf-14e6-ea0a73603d77@arm.com> From: Dietmar Eggemann Message-ID: <60febadb-df21-a44b-d282-e43c104d2497@arm.com> Date: Wed, 19 Feb 2020 09:53:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <787302f0-670f-fadf-14e6-ea0a73603d77@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/02/2020 09:13, Valentin Schneider wrote: > Hi, > > On 19/02/2020 07:15, Chen Yu wrote: >> Problem: >> sched domain topology is not always consistent with the CPU topology exposed at >> /sys/devices/system/cpu/cpuX/topology, which makes it >> hard for monitor tools to distinguish the CPUs among different sched domains. >> >> For example, on x86 if there are NUMA nodes within a package, say, >> SNC(Sub-Numa-Cluster), >> then there would be no die sched domain but only NUMA sched domains >> created. As a result, >> you don't know what the sched domain hierarchical is by only looking >> at /sys/devices/system/cpu/cpuX/topology. >> >> Although by appending sched_debug in command line would show the sched >> domain CPU topology, >> it is only printed once during boot up, which makes it hard to track >> at run-time. What about /proc/schedstat? E.g. on Intel Xeon CPU E5-2690 v2 $ cat /proc/schedstat | head version 15 timestamp 4486170100 cpu0 0 0 0 0 0 0 59501267037720 16902762382193 1319621004 domain0 00,00100001 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00,3ff003ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 ff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^^^^^^^^^^^ cpu1 0 0 0 0 0 0 56045879920164 16758983055410 1318489275 domain0 00,00200002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00,3ff003ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 ff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...