Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp948202ybl; Mon, 2 Dec 2019 22:00:39 -0800 (PST) X-Google-Smtp-Source: APXvYqz7hxmTkWI71ZDwsDIZdcuAzbE7y4JIUwEQduwa3XnS2qVraZf3i6ft2xWNYiC4UCeRk6gL X-Received: by 2002:aca:1103:: with SMTP id 3mr2365958oir.171.1575352839483; Mon, 02 Dec 2019 22:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575352839; cv=none; d=google.com; s=arc-20160816; b=0PZIsVTVqn64jAMyuaCWebs8ovjm/hqzElHVLEr09e2zsWCkQymvFze6UYvNPhAcQB 29+eNWv95Lg0qKwc+ReUDpt3scAz34/T4LCENkBSsWUcMPiDAe3Bzg9ugebOf8PX8bFM yolH7W6aPHOlsvQiKLKvs/tV6QDgZpw1zVzn28Nc3ilOW1e/u5y4FOnbNxTInwjmRh8i f187Of3snibBSXS2qFubgQHFYmYgoCkbtRFOsJGQZapeLteE4/5yR52UFyOn4y5wfG8X W1ND/UPeoR8kcRWBN+tCqNpbpwYQVTx5mUBlFfvcjZl0E3Pb/2DZWgkVhcS/PDaErDtO 9G/w== 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:references:to:from:subject; bh=pLlC3//Gfgt5ppUyB5cpUqrSlaab6jmGTb9VHdA3j44=; b=vx5zVQ3OjNDdlniNVH1/TrCCUowcEJJbrfoY79Td1n/kdP1MaRGJ3AmudSj5jGSh60 kQwgasLbgd4DOQUpi7iiRTLV8hOCSJcF6xk+DOfC9xnT7ZR4YnOkGp9oumEWLd88UiWO 0AwmT7regIctcmteZWE1yCIxZe1oAIMxwnu0jAuyNPzo0ehAk7J6DjkF8kd91IAdYDjc hAdOS7l9lkHipxS9N3n6GoRnUGp2q35YLADh15WTZzOCQ9S/K0ByY+Z8kWfGjmex74R6 6hcpB99bI+UNFKoxisjKjPC6mmAQeLBjymuaB5go2gC4RTD9oaAoiTtWf7O4V5PfVrbS BB+w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si783833oic.86.2019.12.02.22.00.25; Mon, 02 Dec 2019 22:00:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727074AbfLCF7V (ORCPT + 99 others); Tue, 3 Dec 2019 00:59:21 -0500 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:52370 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbfLCF7V (ORCPT ); Tue, 3 Dec 2019 00:59:21 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0Tjn1MiF_1575352754; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0Tjn1MiF_1575352754) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Dec 2019 13:59:16 +0800 Subject: [PATCH v3 0/2] sched/numa: introduce numa locality From: =?UTF-8?B?546L6LSH?= To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Kees Cook , Iurii Zaikin , =?UTF-8?Q?Michal_Koutn=c3=bd?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, "Paul E. McKenney" , Randy Dunlap , Jonathan Corbet References: <743eecad-9556-a241-546b-c8a66339840e@linux.alibaba.com> <207ef46c-672c-27c8-2012-735bd692a6de@linux.alibaba.com> Message-ID: <040def80-9c38-4bcc-e4a8-8a0d10f131ed@linux.alibaba.com> Date: Tue, 3 Dec 2019 13:59:14 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <207ef46c-672c-27c8-2012-735bd692a6de@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since last patch set: Because the locality region concept is too complicated, we tried to decouple the time factor from it now as Michal commented. Now the numa_stat just expose the local/remote page accessing counter , gathering from all the tasks in hierarchy. This should be much more easier to understand, also the meaning of counter is straightforward. Now we have just one locality percentage for each cgroup, to represent how NUMA Balancing is working and imply NUMA efficiency. Modern production environment could use hundreds of cgroup to control the resources for different workloads, along with the complicated resource binding. On NUMA platforms where we have multiple nodes, things become even more complicated, we hope there are more local memory access to improve the performance, and NUMA Balancing keep working hard to achieve that, however, wrong memory policy or node binding could easily waste the effort, result a lot of remote page accessing. We need to notice such problems, then we got chance to fix it before there are too much damages, however, there are no good monitoring approach yet to help catch the mouse who introduced the remote access. This patch set is trying to fill in the missing pieces, by introduce the per-cgroup NUMA locality info, with this new statistics, we could achieve the daily monitoring on NUMA efficiency, to give warning when things going too wrong. Please check the second patch for more details. Michael Wang (2): sched/numa: introduce per-cgroup NUMA locality info sched/numa: documentation for per-cgroup numa statistics Documentation/admin-guide/cg-numa-stat.rst | 176 ++++++++++++++++++++++++ Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 4 + Documentation/admin-guide/sysctl/kernel.rst | 9 ++ include/linux/sched.h | 15 ++ include/linux/sched/sysctl.h | 6 + init/Kconfig | 11 ++ kernel/sched/core.c | 75 ++++++++++ kernel/sched/fair.c | 62 +++++++++ kernel/sched/sched.h | 12 ++ kernel/sysctl.c | 11 ++ 11 files changed, 382 insertions(+) create mode 100644 Documentation/admin-guide/cg-numa-stat.rst -- 2.14.4.44.g2045bb6