Received: by 10.192.165.148 with SMTP id m20csp1370161imm; Thu, 10 May 2018 09:38:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoIq5/pYdsA+THULprQHARLWwG/nRelpRwSMbVTlfD85jLB/vTl73i5DE39Z+LJuGAUcP2m X-Received: by 2002:a17:902:10c:: with SMTP id 12-v6mr2062624plb.252.1525970295727; Thu, 10 May 2018 09:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525970295; cv=none; d=google.com; s=arc-20160816; b=g9Q99zc3DP677crQZVt2ah2f2VQx531NP8QemHg1xmppf/xW8iRe2gayGlXSTltjg1 OWe6sfxQAYFxd/N7AcHhGd3ycecX5psXQA2aVcYb54BX2LapYuELS6+hZguYJsNt7Knd QNiSsNkot+H9YH9n/Q2q0YOjpgAtB/4MWPLDxQRxi9ibu2Drr3dDC1ZGnbBfnF6ckBvl a/ekfCiTX4FR1rYkiXV2GQNI/G1AR1Uu+vXPXceTHeHeNkuTif6G1oc2ofI5SlBXDORa Ico9F0h28yECKiLoeItPoL7akMkLzo0dgujvEqfs8+zusu5ntxXqSzVOs2uJGtOFgjX7 wLrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=V5lkHQZBYGwcN6+re7GeODTH3kgwyOIhqJN2+9Jyp7g=; b=HFmecy68BF8wgXxRPfAmqu4xCAOPcFN292HZ8dsIjHhH8BS0uLd4nJ49VUymXnYJvo OUkRb3/OAeYE3qKvrSJV7WdXcgezT7Ak57DqEXz3dBDBzLKjgCQaAYmOvvCU47DiqQtU 2VxjIQVGAtB2CDH4J57vvgLlcS19xORs6aEj84aew9WmJELjM2zHBptrZvSmMnPQ4//s A0ocDDaHCmukCpFOQEKDEqz32/fJT1IbIv7vyf6uJ8fRqFqDzrt0s5i66//JhJxGkc7I qfqOJxnvmqR3mh4aVe/tiu2FSxoTOMJe6JJaTGdwh1ND39b30fiWZcdOnWXPecZy2xnb F6VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=eU6dn2p0; 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 y67-v6si1148217pfi.195.2018.05.10.09.38.00; Thu, 10 May 2018 09:38:15 -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-2017-10-26 header.b=eU6dn2p0; 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 S966443AbeEJQhl (ORCPT + 99 others); Thu, 10 May 2018 12:37:41 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38972 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965017AbeEJQhj (ORCPT ); Thu, 10 May 2018 12:37:39 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4AGVgdT161809; Thu, 10 May 2018 16:36:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=V5lkHQZBYGwcN6+re7GeODTH3kgwyOIhqJN2+9Jyp7g=; b=eU6dn2p05rLhct5tXrP5KSVHJqEg1W9qzrXpceJgyMXek56Wzb5h2E/vs+Zk+uKLbvC9 0v33As6eOpfJs4HmiXddd3o0yjnybr6lw9E9pL6s1faFqEt9vq3th5fQzwQ5sRlgv0oV 39iYfxH6O4Q4avAj7qY1ZUBwi1CSSTvrO2WLhKcHHGi7soDXJopuT8dggYAvaQW/PxKN q4PaRwKmpFw6PT/+l6aVqYTLvMwZl8eYOQxGl2cCNUEVK4OCdv3uanFZ7Wd3WNI+0NHM rbrIbHKrs8u/fe7F/C15n1mkNjV31d3SAMrQYc8PKbyiT8q5j8STCSb9JoYGO5ZdNxOG Fg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2hvs8404ws-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 May 2018 16:36:29 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4AG0PmB023381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 May 2018 16:00:25 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4AG0P2S027296; Thu, 10 May 2018 16:00:25 GMT Received: from dhcp-10-159-247-154.vpn.oracle.com (/10.159.247.154) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 10 May 2018 09:00:25 -0700 Subject: Re: [RFC PATCH] Add /proc//numa_vamaps for numa node information To: Michal Hocko Cc: Christopher Lameter , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com, drepper@gmail.com, rientjes@google.com References: <1525240686-13335-1-git-send-email-prakash.sangappa@oracle.com> <20180504111211.GO4535@dhcp22.suse.cz> <20180510074254.GE32366@dhcp22.suse.cz> From: Prakash Sangappa Message-ID: Date: Thu, 10 May 2018 09:00:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180510074254.GE32366@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8888 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 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-1711220000 definitions=main-1805100156 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/10/18 12:42 AM, Michal Hocko wrote: > On Fri 04-05-18 09:18:11, Prakash Sangappa wrote: >> >> On 5/4/18 4:12 AM, Michal Hocko wrote: >>> On Thu 03-05-18 15:39:49, prakash.sangappa wrote: >>>> On 05/03/2018 11:03 AM, Christopher Lameter wrote: >>>>> On Tue, 1 May 2018, Prakash Sangappa wrote: >>>>> >>>>>> For analysis purpose it is useful to have numa node information >>>>>> corresponding mapped address ranges of the process. Currently >>>>>> /proc//numa_maps provides list of numa nodes from where pages are >>>>>> allocated per VMA of the process. This is not useful if an user needs to >>>>>> determine which numa node the mapped pages are allocated from for a >>>>>> particular address range. It would have helped if the numa node information >>>>>> presented in /proc//numa_maps was broken down by VA ranges showing the >>>>>> exact numa node from where the pages have been allocated. >>>>> Cant you write a small script that scans the information in numa_maps and >>>>> then displays the total pages per NUMA node and then a list of which >>>>> ranges have how many pages on a particular node? >>>> Don't think we can determine which numa node a given user process >>>> address range has pages from, based on the existing 'numa_maps' file. >>> yes we have. See move_pages... >> Sure using move_pages, not based on just 'numa_maps'. >> >>>>>> reading this file will not be restricted(i.e requiring CAP_SYS_ADMIN). >>>>> So a prime motivator here is security restricted access to numa_maps? >>>> No it is the opposite. A regular user should be able to determine >>>> numa node information. >>> Well, that breaks the layout randomization, doesn't it? >> Exposing numa node information itself should not break randomization right? > I thought you planned to expose address ranges for each numa node as > well. /me confused. Yes, are you suggesting this information should not be available to a regular user? Is it not possible to get that same information using the move_pages() api as a regular user, although one / set of pages at a time? >> It would be upto the application. In case of randomization, the application >> could generate  address range traces of interest for debugging and then >> using numa node information one could determine where the memory is laid >> out for analysis. > ... even more confused >