Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5950955imm; Wed, 12 Sep 2018 13:48:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaoyzqGpj3NjF6lQx0Vz10NweP7iq1kr9tGaNrgk08heTq64HN1ucmlUJuoiewxseCMSySK X-Received: by 2002:a62:41d6:: with SMTP id g83-v6mr4198370pfd.219.1536785280977; Wed, 12 Sep 2018 13:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536785280; cv=none; d=google.com; s=arc-20160816; b=O+VAqDqicBq3Ua1+v8qwXZvSc5u3Ad4a3S6kpdtvVdfRVdK6TRo3b2GNAN/h53oaSA NV6NGN3j5tw5gy17IsKRkb3woPtiEUZSfUHNoQlTQb3zTqYhZGApP8IrIBbzAwr+k8m3 PW2QVN6u/PVHZas1v2MCz66aNZyQw9IupZGjQuLEB2En3DCayRo24n2X/Ru7i3UOlCrz XKbVLEZMhN9owAnVElqPa0/xL6XUrHN7C0ahp7kQXvXgxQxqjFzdp9gWVGCSV/Loa+G8 ImYxXFrMiLuqPXnAcRe9VNCMpTHJ0Q7YMpkhAnXaz+iaEfaMcDpAF3H1sCe7GGnO+/0o yrQg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:to:references :subject:reply-to:dkim-signature; bh=Bba9sSXEN3aytWGO0OCu8Guqy9lM/DrpAsnYx+r9ZN0=; b=M8+TMhkZQc7B7KGJvGy2TtXKWY6Kgt0RSY7/5YCtg91iUwGIDZQDjPHyUqB9jX78cc 2sXOTwNIK1ladA91cmKTsS16f9r8THTxv5Usr85k1Ho4hos6f6MEk/KYSOQF6ip1532J HuNfumZln4I8reWzC+TiMWdcsvFp/oZ19ifNiZE8dxg2swGPqvtBSE/uvC4D9ITbMzrd clzDkw+bX7/sObeOvPlYBjY4Xl7VSsfuYsTU9nslJ+/QbRpnZc/0Ws+fJURUfC+MvjSb MnIzoL6Yt2HnE2WBNrby6hAW3mhUSYOXiDBTf8UFFvnerJcWHkNjCdm2sjERk7Y6cLiR Hv+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=rb9i4q5D; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a74-v6si1974848pfe.301.2018.09.12.13.47.45; Wed, 12 Sep 2018 13:48:00 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=rb9i4q5D; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbeIMBt5 (ORCPT + 99 others); Wed, 12 Sep 2018 21:49:57 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:57106 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbeIMBt4 (ORCPT ); Wed, 12 Sep 2018 21:49:56 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8CKcwSa080779; Wed, 12 Sep 2018 20:43:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=reply-to : subject : references : to : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Bba9sSXEN3aytWGO0OCu8Guqy9lM/DrpAsnYx+r9ZN0=; b=rb9i4q5DqnhlBS6lXXewoZNtUwZF6+jxI/fFd8U2EwweT9avGPyqtYops1xk1d0l2gRh aVZNZuzhDZhh6LSSp1Bar+eQKLq9Ggz6NeWog81GeoT0dhkEZ1IXY3p+KWfpSdnAMVS+ Ee1fqWbOGRfAWGIrh687z4la0Xd8xsgMm834iw8bZo6LNadYj+uZMJ4lEQKQiIpdgyCa aY2I6hByO2+0d9Tv9AeqbbnejD2LvxSIoB2jjQ4TC9J1Qrq/KU8MjxRl8onWoTtV3P4A ZAYZcvFACYYBYp1taoue7ot3dhkykQyUK4miwFnKa3YW6Q1Bti6HtPSWEumAu7AKwei+ fQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2mc5utmhdt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 20:43:28 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8CKhMVs031128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 20:43:22 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8CKhLiS011093; Wed, 12 Sep 2018 20:43:21 GMT Received: from [10.132.93.61] (/10.132.93.61) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Sep 2018 13:43:21 -0700 Reply-To: prakash.sangappa@oracle.com Subject: Re: [RFC PATCH] Add /proc//numa_vamaps for numa node information References: <1525240686-13335-1-git-send-email-prakash.sangappa@oracle.com> <20180502143323.1c723ccb509c3497050a2e0a@linux-foundation.org> <2ce01d91-5fba-b1b7-2956-c8cc1853536d@intel.com> <33f96879-351f-674a-ca23-43f233f4eb1d@linux.vnet.ibm.com> <82d2b35c-272a-ad02-692f-2c109aacdfb6@oracle.com> <8569dabb-4930-aa20-6249-72457e2df51e@intel.com> <51145ccb-fc0d-0281-9757-fb8a5112ec24@oracle.com> To: Dave Hansen , Anshuman Khandual , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, mhocko@suse.com, kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com, drepper@gmail.com, rientjes@google.com, Naoya Horiguchi , Steven Sistare From: "prakash.sangappa" Message-ID: <94ee0b6c-4663-0705-d4a8-c50342f6b483@oracle.com> Date: Wed, 12 Sep 2018 13:42:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9014 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120203 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2018 04:31 PM, Dave Hansen wrote: > On 05/07/2018 06:16 PM, prakash.sangappa wrote: >> It will be /proc//numa_vamaps. Yes, the behavior will be >> different with respect to seeking. Output will still be text and >> the format will be same. >> >> I want to get feedback on this approach. > I think it would be really great if you can write down a list of the > things you actually want to accomplish. Dare I say: you need a > requirements list. > > The numa_vamaps approach continues down the path of an ever-growing list > of highly-specialized /proc/ files. I don't think that is > sustainable, even if it has been our trajectory for many years. > > Pagemap wasn't exactly a shining example of us getting new ABIs right, > but it sounds like something along those is what we need. Just sent out a V2 patch. This patch simplifies the file content. It only provides VA range to numa node id information. The requirement is basically observability for performance analysis. - Need to be able to determine VA range to numa node id information. Which also gives an idea of which range has memory allocated. - The proc file /proc//numa_vamaps is in text so it is easy to directly view. The V2 patch supports seeking to a particular process VA from where the application could read the VA to numa node id information. Also added the 'PTRACE_MODE_READ_REALCREDS' check when opening the file /proc file as was indicated by Michal Hacko The VA range to numa node information from this file can be used by pmap. Here is a sample from a prototype change to pmap(procps) showing numa node information, gathered from the new 'numa_vamaps' file. $ ./rpmap -L -A 00000000006f8000,00007f5f730fe000 31423|more 31423: bash 00000000006f8000 16K N1 rw--- bash 00000000006fc000 4K N0 rw--- bash 00000000006fd000 4K N0 rw--- [ anon ] 00000000006fe000 8K N1 rw--- [ anon ] 0000000000700000 4K N0 rw--- [ anon ] 0000000000701000 4K N1 rw--- [ anon ] 0000000000702000 4K N0 rw--- [ anon ] 0000000000ce8000 52K N0 rw--- [ anon ] 0000000000cf5000 4K N1 rw--- [ anon ] 0000000000cf6000 28K N0 rw--- [ anon ] 0000000000cfd000 4K N1 rw--- [ anon ] 0000000000cfe000 28K N0 rw--- [ anon ] 0000000000d05000 504K N1 rw--- [ anon ] 0000000000d83000 8K N0 rw--- [ anon ] 0000000000d85000 932K N1 rw--- [ anon ] 0000000000e6e000 4K - rw--- [ anon ] 0000000000e6f000 168K N1 rw--- [ anon ] 00007f5f72ef4000 4K N2 r-x-- libnss_files-2.23.so 00007f5f72ef5000 40K N0 r-x-- libnss_files-2.23.so 00007f5f72eff000 2044K - ----- libnss_files-2.23.so 00007f5f730fe000 4K N0 r---- libnss_files-2.23.so total 3868K -Prakash.