Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp795990ybl; Mon, 2 Dec 2019 18:22:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwkmIBLTMCCIRNS3dqtECiZGwNf5JkdC8LJ8iryFbouiPedjsrb8CsJpG8psOdGd/p7g3iJ X-Received: by 2002:a05:6830:551:: with SMTP id l17mr1746341otb.282.1575339729782; Mon, 02 Dec 2019 18:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575339729; cv=none; d=google.com; s=arc-20160816; b=vI3NWEGDeAI12EyHewKXr1G2UGPorkCp9jo+Gyn2iGQWGjJFSfa79p2iZVeK6dWWqs cEl+b3N8QEX82zEdRepQvSYfffq6v1iKjpSN3R9IZxngPQ3hIUnGe6aT6Kq+Mw4O5xVa 6wZFON22YivqZCAF7Ev5tQ571e+fYHuXlyEOUq2Kie6LI5UHYbPBeXyH7IJVvySI3MN5 KeIXPlfktp/NDtZp0QrQ/cXTWqSxpoEHJIKHD1rp3ZNbrBboXtapf9nku5IG5/j06rSO 2rt3KTToM49k+Nqh/XMJU0841WfhcrwTcJGx1frjnhA0LZfdC0LFU0r3kcGrgc9VV/6N oMHg== 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=cdgsb4Bi2QFgcX1VU/uxxqfxLhJP7n8UnF5a7HK7UfM=; b=um3BLnd2LYcnBly/PMecarzXjBTHnij4YfPK1f+pfg4Efif8db+BuT2pupNRlXefmT bH+X1MWibo8CfPTxqc8ngDxsJH8nXzjkeWzXc+MiKlJUlgVrXv85/YYtov+wkDAT2kJk QKjwGVF/5K9bqEyd9eyPHTLI4Y60ZqfKUWRCBqFjDikZnZiG/3YB9OOgwGuSqqOec2qO mtXAY0mwxyb0hy6lQrhNfTTudo9QpwOxFFqFzrtq1A/s5HgtqWF2hDdyOU6No6QY910g ThDtOIJJOaD1Ccpu0q/Xz4F3GroMA+cW0L2Vv79AzpbRqoCMPDZ9M8eh6nOb6lRa+bo3 WAkg== 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 v20si561001oia.159.2019.12.02.18.21.57; Mon, 02 Dec 2019 18:22:09 -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 S1726318AbfLCCT7 (ORCPT + 99 others); Mon, 2 Dec 2019 21:19:59 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:60625 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfLCCT7 (ORCPT ); Mon, 2 Dec 2019 21:19:59 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TjlrUB7_1575339596; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TjlrUB7_1575339596) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Dec 2019 10:19:56 +0800 To: Ingo Molnar , Peter Zijlstra , Juri Lelli , =?UTF-8?Q?Michal_Koutn=c3=bd?= , Mel Gorman , Linux Kernel Mailing List From: =?UTF-8?B?546L6LSH?= Subject: [PATCH RESEND] sched/numa: expose per-task pages-migration-failure Message-ID: <7038afda-dd08-f01f-5da0-afadf76f5533@linux.alibaba.com> Date: Tue, 3 Dec 2019 10:18:17 +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 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 NUMA balancing will try to migrate pages between nodes, which could caused by memory policy or numa group aggregation, while the page migration could failed too for eg when the target node run out of memory. Since this is critical to the performance, admin should know how serious the problem is, and take actions before it causing too much performance damage, thus this patch expose the counter as 'migfailed' in '/proc/PID/sched'. Cc: Peter Zijlstra Cc: Michal Koutný Acked-by: Mel Gorman Signed-off-by: Michael Wang --- kernel/sched/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index f7e4579e746c..73c4809c8f37 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -848,6 +848,7 @@ static void sched_show_numa(struct task_struct *p, struct seq_file *m) P(total_numa_faults); SEQ_printf(m, "current_node=%d, numa_group_id=%d\n", task_node(p), task_numa_group_id(p)); + SEQ_printf(m, "migfailed=%lu\n", p->numa_faults_locality[2]); show_numa_stats(p, m); mpol_put(pol); #endif -- 2.14.4.44.g2045bb6