Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp264161ybl; Thu, 12 Dec 2019 17:53:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxNVIcYXSf4ggMaF+jdJ93uThaxCDMk2IMddFzHZfQYGd/A5RYAdvV7d3PBxu75XjY1Kpj5 X-Received: by 2002:a05:6830:681:: with SMTP id q1mr11609840otr.162.1576202034896; Thu, 12 Dec 2019 17:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576202034; cv=none; d=google.com; s=arc-20160816; b=y02O6kLM040l1XJr2MQkwmOPx5j7+M8g5fBXffLc37JihiaJrsFnASuDbYT2BLfmHk eBh5NqQvWT+qBrmXDKge1wmKPO7RJpWpR/Oij1v+wST03hOmrn0ZFJx9vvKpW1ojjiED /V/icsKx6wQ4CIRZhaufkWkb84bZdMqFEry8RfZL0JL9JWFOS09cmAvd2j0ZURwVLCJV 6z3x838QFbD/zKHWBes/KvByGl26kcxcTIp4heNP3sxq8YvuwFuCK+7uK1Ih/16MN5Rh 8snv1vvvSmcNdCB4lOy8v1EZ1leTHHkmYp9IkxEIfgAkj+wMwsrA+kS4X42fF/KWJCia 1XIg== 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=NX3Chhrnfd4HfWLVbBgoI07Rmj1Hat2AkqrEqSSmWqM=; b=J4Kt98l2EFXoTXXFay2gMvQruUp8C6sEScuUcux3Q6uJuFc1WXh7h1+5axIokp1Bvh fox/z0+97L4Mv34H2V2KSxhs359ASBrcrN5wwhXn+QL0whhctl8a/0QhdT/XEbWBeCaj 3sAENtw6GEZ1/N/ywEKm2hdRd31LWFxVI1jHmOIG15ACY4JnRS/x0ibXmJmlleoxh9a2 uV5EAjQOJQ4Sbk3AnL7Ipji4jUiIUOPgUpu1um36ADHB3k+/SDPypIjxOovx5R9DXjlB Dyw6JVMQSt0mYl3cyCod1AYB481qNk57EuDi8b/z//qDCOjTSS5OaAM9govlCP6SMg3c WVXw== 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 l21si4383022oic.126.2019.12.12.17.53.17; Thu, 12 Dec 2019 17:53:54 -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 S1727925AbfLMBp0 (ORCPT + 99 others); Thu, 12 Dec 2019 20:45:26 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:36134 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbfLMBpZ (ORCPT ); Thu, 12 Dec 2019 20:45:25 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0Tkka4D._1576201519; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0Tkka4D._1576201519) by smtp.aliyun-inc.com(127.0.0.1); Fri, 13 Dec 2019 09:45:20 +0800 Subject: [PATCH v6 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> <040def80-9c38-4bcc-e4a8-8a0d10f131ed@linux.alibaba.com> <25cf7ef5-e37e-7578-eea7-29ad0b76c4ea@linux.alibaba.com> <443641e7-f968-0954-5ff6-3b7e7fed0e83@linux.alibaba.com> Message-ID: Date: Fri, 13 Dec 2019 09:43:13 +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: <443641e7-f968-0954-5ff6-3b7e7fed0e83@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 v5: * fix compile failure when NUMA disabled Since v4: * improved documentation Since v3: * fix comments and improved documentation Since v2: * simplified the locality concept & implementation Since v1: * improved documentation 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 | 178 ++++++++++++++++++++++++ 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, 384 insertions(+) create mode 100644 Documentation/admin-guide/cg-numa-stat.rst -- 2.14.4.44.g2045bb6