Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp132328ybv; Thu, 6 Feb 2020 19:36:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyLbe9T4HjVyyt2JLKEWSRlL4d72+QCdUzCxLwX+It4Eyn8Y75g64x30ebpVPPrSHo6RDrT X-Received: by 2002:a9d:3b8:: with SMTP id f53mr1042928otf.47.1581046577111; Thu, 06 Feb 2020 19:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581046577; cv=none; d=google.com; s=arc-20160816; b=TxnFhPXGPIyn20UXAqbvHQGOccGdtGRsqsydOB3ZsM4XekkLcg1X3Wwvy2CclqWYdK gWMQFpU9ENQGKvCeBRFnsyz9PYbw4MwHkkwKtxLla0oOsOfjwAIkLWBwIp1eatyf3eem tRVOcU2Jiqcdoe4Bmh19klLBdAjh/pbhiwvp1UU4bkd0fZqf+9LtxqM3XTGLzVXQKo9m xjE7fd+E201z1RxdCs2o8EfS9e0cmUwQniyXsskP3ZWxBhUtuCFCQnckLGr3gM9ann5A vb+0WkAJ5Ih1dpK7QXpsnul6sDGA9AlX9RZmiizwOX0WNWQB/096XfsvyAWv/kc1ZrLl SmtA== 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:mime-version:user-agent:date:message-id:subject :from:to; bh=2yyAU/k1md2Tj+Y51oP+MrgkCtRpGardKghUeqjm8Qg=; b=dPn1+jnc9UlL3+Qsa0U5sFj7kEh+ROEiEwBOK6FGLQ2SXTE5eCyVQ39HiXuUFKYpGq ZGRGq8/eajAq7/AuFysBaQcpPMH3A4RsfeIIM5IE+84ekssqAO3DTxAIHw8wElOwWzyX XLFt0IWx+Sz8apvfjGjvzJ8BHIpt3hZbDMhyvH6KbRVtR92rlkVSJEQg0yw9STYn/vMZ nTbr1/kcUyM2EZnvzYXDFTm0CG0pFHDBy5QmVS8AmMLHjTe/DvbGUgrB27efpHKb4nB5 KGvSdegSPNLZD0DSls+kIfHBhMQgrdc0yGyxmHDjpgIzJaG1az0C7Ui8wtJQfnTW8CrY u4Ww== 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 e26si1012511otp.140.2020.02.06.19.35.59; Thu, 06 Feb 2020 19:36: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbgBGDe7 (ORCPT + 99 others); Thu, 6 Feb 2020 22:34:59 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:60017 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbgBGDe7 (ORCPT ); Thu, 6 Feb 2020 22:34:59 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04428;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0TpKMeB3_1581046489; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TpKMeB3_1581046489) by smtp.aliyun-inc.com(127.0.0.1); Fri, 07 Feb 2020 11:34:49 +0800 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 From: =?UTF-8?B?546L6LSH?= Subject: [PATCH RESEND v8 0/2] sched/numa: introduce numa locality Message-ID: Date: Fri, 7 Feb 2020 11:34:48 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 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 v8: * document edited v7: * rebased on latest linux-next v6: * fix compile failure when NUMA disabled v5: * improved documentation v4: * fix comments and improved documentation v3: * simplified the locality concept & implementation v2: * 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