From patchwork Mon Aug 1 12:17:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: haoxin X-Patchwork-Id: 12933718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14E29C00144 for ; Mon, 1 Aug 2022 12:17:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67EEB8E0001; Mon, 1 Aug 2022 08:17:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 62EC56B0072; Mon, 1 Aug 2022 08:17:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 51EF98E0001; Mon, 1 Aug 2022 08:17:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 414936B0071 for ; Mon, 1 Aug 2022 08:17:37 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1DFE4AB29A for ; Mon, 1 Aug 2022 12:17:37 +0000 (UTC) X-FDA: 79750924554.17.8F8CACD Received: from out199-14.us.a.mail.aliyun.com (out199-14.us.a.mail.aliyun.com [47.90.199.14]) by imf09.hostedemail.com (Postfix) with ESMTP id D536F14010E for ; Mon, 1 Aug 2022 12:17:34 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VL6DdII_1659356249; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VL6DdII_1659356249) by smtp.aliyun-inc.com; Mon, 01 Aug 2022 20:17:31 +0800 From: Xin Hao To: willy@infradead.org Cc: akpm@linux-foundation.org, adobriyan@gmail.com, keescook@chromium.org, xhao@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH V4 0/1] mm: add last level page table numa info to /proc/pid/numa_pgtable Date: Mon, 1 Aug 2022 20:17:26 +0800 Message-Id: <20220801121727.76186-1-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of xhao@linux.alibaba.com designates 47.90.199.14 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659356256; a=rsa-sha256; cv=none; b=S5PreJYQD4wfP7BWu+ruMx4da35gRKiIiVu47M2Lvvy4sdPLR83ZUz3hroyXRrR7jYVtZ6 x+MM1zvaOtU0F9yOtf8gMP2BrkFHzCCYAzGHK5cuVnZpr35vNDdKt2v9Nuq9G2Dz0uv1se r5rWZxtW62tx+JswF6kKP9uxAaCeWy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659356256; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=rYTN9YCGhgAb0pvlBWKJKxFzyrX5KxiMav1JmuhKTis=; b=TQrkzGMUGrg8Y7ObMKsDaUG6DEuxTuI5CrwVT8F0X4vKoog0ay0BxQQJ7///JqwYYDhbr9 44SEZJelMH5UXixi+qU4U6SfB2djq4XXe9hfQMe5BXlv8rOmSNPJBWS0ebAkn1XxUR/w5q Q8hlAjnIeV6zEONoEf5xnU66zmDnVpw= Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of xhao@linux.alibaba.com designates 47.90.199.14 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Stat-Signature: qfikrhp5fjuzmao195o57yfz5cr5mpmu X-Rspamd-Queue-Id: D536F14010E X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 1659356254-488818 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In many data center servers, the shared memory architectures is Non-Uniform Memory Access (NUMA), remote numa node data access often brings a high latency problem, but what we are easy to ignore is that the page table remote numa access, It can also leads to a performance degradation. So there add a new interface in /proc, This will help developers to get more info about performance issues if they are caused by cross-NUMA. V4 -> V3 1, Add some detects and spinlock when operating PMD page as Baolin Wang advised. V2 -> V3 1, Fix compile warning bug. V1 -> V2 1, As Matthew Wilcox advise, Simplify the code. 2, Do some codes format fix. V3: https://lore.kernel.org/linux-mm/20220801032704.64356-1-xhao@linux.alibaba.com/ V2: https://lore.kernel.org/linux-mm/20220731155223.60238-1-xhao@linux.alibaba.com/ V1: https://lore.kernel.org/linux-mm/YuVqdcY8Ibib2LJa@casper.infradead.org/T/ Xin Hao (1): mm: add last level page table numa info to /proc/pid/numa_pgtable fs/proc/base.c | 2 ++ fs/proc/internal.h | 1 + fs/proc/task_mmu.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) --- 2.31.0