Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1361008ybc; Tue, 12 Nov 2019 19:46:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwV40Hut1e6ySvTUb8ONwAlfIBq//dFdnh4kuXaqpJOaAfYWIcBnBQz+VcbAZ1HqcQAIxj1 X-Received: by 2002:a17:906:1e02:: with SMTP id g2mr779993ejj.6.1573616809420; Tue, 12 Nov 2019 19:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573616809; cv=none; d=google.com; s=arc-20160816; b=G6TolmjnsTVmFWbmb4LG3pcDxFDLglqtKe4WPb5ITW1trQz4Ro8QkswaMzPGmkcEm9 J9IfNoqvl4OtWh0z2uVvBRk7uIp2qFxkEGm3UQ9ZU22l4MFIMEsOomJKoxkHTtVSc+4G dr7KmCv+f3LVpDScR4VQS0qxQxRdbZQa0AF05IITQMJW+i+Qrye+OJ0klF1LTH5C6ik5 3OnfdlwLbbwRPT1ohnbQAlfmUBvtMIE9chcgdwodY5OF2XafkWooXOrZkIiaTMZ3mRJt 03ijDcNlteTYkkZ36g0ecZxXKd+xhc7qD/nGoNedYy27s3iL8V4iJu5uhrn6NPNfoNyu 6Ijw== 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=HS0+T9ZrBCkoOgLbX7gFebJTaVBWqupUo1xZttRYC6s=; b=TUnFzWyQCDWlrQeBR/ogIAuWUNhmZqUhDowE/jjLCHun5vj7A5AgHRcCEVy1C7SFjQ d+uD+mdbK5fz/HL422mRT5VNCvZKUlVTN3lNh4+E0HVZJs11JyeKFIQj3VYQev39BwEg /SGq5M6LgINeLhpJhE8NyioOP8gpgG3xcXs+/FAM0aOKdKaHxdMuxiAx56CtbuyCVBnc mulVpb07whBWmCGgKLxtZsQ8XgZ5VXsfg/u6D3Rx2UEL0KtUkrUzKvROnFZyEhClIi12 wkofZAUZbZWEB02lq9RzxWkRLCq5soR0uDhx/JspIGc7VKMPopmYlGi5gUxFwMki78Jl sJHA== 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 v9si503678edf.36.2019.11.12.19.46.24; Tue, 12 Nov 2019 19:46:49 -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 S1727659AbfKMDpV (ORCPT + 99 others); Tue, 12 Nov 2019 22:45:21 -0500 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:59381 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727466AbfKMDpV (ORCPT ); Tue, 12 Nov 2019 22:45:21 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R531e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01451;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0ThxeNA8_1573616715; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0ThxeNA8_1573616715) by smtp.aliyun-inc.com(127.0.0.1); Wed, 13 Nov 2019 11:45:16 +0800 Subject: [PATCH 2/3] sched/numa: expose per-task pages-migration-failure 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" References: <743eecad-9556-a241-546b-c8a66339840e@linux.alibaba.com> Message-ID: <16f702e2-d844-20d5-4b4d-4a18c8ffd175@linux.alibaba.com> Date: Wed, 13 Nov 2019 11:45:15 +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: <743eecad-9556-a241-546b-c8a66339840e@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 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ý Suggested-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