Received: by 10.192.165.148 with SMTP id m20csp227905imm; Fri, 4 May 2018 09:20:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZosbB/WHDCfplV14Idz0L8r2CWQs2y8j5t9fKvPmvbMZ6MJRmAKQ457lD1ra9Tczja2PKtd X-Received: by 2002:a63:66c2:: with SMTP id a185-v6mr12161601pgc.347.1525450825302; Fri, 04 May 2018 09:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525450825; cv=none; d=google.com; s=arc-20160816; b=XGWhYMXDFTXpMYFH2tacSsAscGIiAL22Py07AemJWjxCUSHQXC7CWPZtB2eLgCNYpR R3OqR5LWdnNJakomqYcI/cRJ2AJmPBQmPUVy3O2swSBgE3edV2Vd4oGZZwm60LTBsIQC HsTQE2i08QvTd41jJ6/uAYyP2twPPSFbo26W0FchMu8Uh65fpCoD4tRYnhNyzTPPJ7b8 m5zvv1wz06HhpSo+6cZDCFUnBH7q1qgbB0Gn76SdOu5f0/ToquAKhUd6o7FMq//uC+DD /hZNtxpfiDHezr655elILDUm+AC7+c18mp1MFAmIdSxbvTiGq5UrAVw4Fjb/vI2Ia2gI cXPw== 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=uJU2N/++c0piytgt4RkIf2Ur8+8T7BDcBxlVKjOd3MI=; b=x8JJpblhSzoVFgc7GtkQtJsgnVKgMDR7lpb7dspTGNHE5b398O/jZlw22OwrZJoJgi qXYgMUgYzR34KrZiTynmbFQeJ7+Gv1oy5nODOKmquccwiIeoLPVCEPLra2qhjcQwOG4e JJ3LNMPolNPUHdAAsTYsTJHFBTgdeBKxwvSg+NaigStHpxj7ARhiLmvVPQDoozmTS48x F1WtC+eq/xLNBY++IjaTrJ9/jdaladm6htowByrvk/yuuMrGSinF/U4fsxBFFP3vdQTs r3ESmtZGfFeONBDK20wsDOQ7p7maZOEyiia26QixVhlijLm7mxsBKNLN0MndkAFLos7K +2GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=jjeIx7vt; 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 k189-v6si13340707pgc.388.2018.05.04.09.20.10; Fri, 04 May 2018 09:20:25 -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=jjeIx7vt; 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 S1751582AbeEDQSh (ORCPT + 99 others); Fri, 4 May 2018 12:18:37 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50982 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbeEDQSf (ORCPT ); Fri, 4 May 2018 12:18:35 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w44GHdVY192342; Fri, 4 May 2018 16:18:23 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=uJU2N/++c0piytgt4RkIf2Ur8+8T7BDcBxlVKjOd3MI=; b=jjeIx7vtFtZHDLtWJUboAbsN/uN8xVn3Q+HZ7MZFwwyYkAcq2y3mI6XA/QwnAsxr97lV luxMpIlSXhgtkoHc0Bdm6oasLYDsibtUzMsB012R5YTdyVEBsEHJCAWjEZCoafys/3Sa FXDOFvQuoYnozJODtkpE5k/PJ2lQXmixqSN1G6DuSu68MONCsX047ye+Anf5/pGckXXO fcis6G9Ri3hqo6UZRiHULXEtATe3U6x60jyBoy0LjSacx5OMPReIkXZavT8NDIPJYn+b kNLboTEOCmpafFQEbILVSpCmABm94m3TjDgFlQthV4SIOhT7Me2T78ZaKE/L6BBpjfKg dQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2hmgxg70f9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 May 2018 16:18:23 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w44GILUY004098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 May 2018 16:18:21 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w44GIKen028593; Fri, 4 May 2018 16:18:20 GMT Received: from Prakash-Sangappas-MacBook-Pro-3.local (/73.231.60.5) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 04 May 2018 09:18:20 -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> From: Prakash Sangappa Message-ID: Date: Fri, 4 May 2018 09:18:11 -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: <20180504111211.GO4535@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=8883 signatures=668698 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-1711220000 definitions=main-1805040150 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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.