Received: by 10.192.165.148 with SMTP id m20csp816212imm; Thu, 10 May 2018 00:44:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoEt/Zx6CTCes68yc5DWUylnmWOKJSMzj6Dl6yAT+Exb9v0Di7kd5oxv8epL3Sd4prh+LIt X-Received: by 2002:a17:902:7149:: with SMTP id u9-v6mr347945plm.356.1525938256837; Thu, 10 May 2018 00:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525938256; cv=none; d=google.com; s=arc-20160816; b=c7htpAseIMhzRmeSXoDSBoXPWj7g4LRhHc+AFX7SJE5PuZzAIAxdpyviYZvPRJbOA3 WZsM+1MMhH9PZpZrpgrL5nmhtVlfszyJgYLZAeWhUrn4i3yM65DXjwisugmhXYoB8H7s 2MCfnlR7S03cG4L/N2Scat+idSedg7AxgQpiSEXut6IOhJEolpZ2V50eClLFyvQX3sto zedfxn7MRLZpRGjHShQREIc7SXUdzotU2brITxvaeQZYwZ9ovzjlLGRl6k2rl6zo1VsE EBijtx1ShL9C1TrXw1cvWtAbbZIj6AnFYPA4oDgTxkH2v4c5ApvJenq0hsD/V/q/iDsG 9BoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=kZiCrPOATBFka4xvsFyLmxmAxZwWe5J8PjhYJndG4SU=; b=nlkHT3pDn1+QsgnbmNGk96f6NMBa3Hin/uiwQBJKHQpZd23gB0IBNzbRsWmQ6peE9Q pKYg7U7WvZ2lLYkpIF0uLtUqHrFO/azCxsLt2B9Kw6nj8lOUVdH6w3Fv84tB07TSGvrH TlKYS1fOnK3XkLX3H9yxCkmAR+ctKAj+Y9Ab59pUFaWUac58R4JomZq03I9aVmC5QgSp XvGZuaieQTs43rcV7FOPLP1GZEIy4kfLwnr7ThRG9bO17uTOOj80nFWOP1UHrtBIQJmq FAATd3otwI7SobF3xzPp0fdvolRo4I294fgjM07fTlQC233s7rrQ6Edx9BBnAhps5Dla 46jg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21-v6si130378pgn.672.2018.05.10.00.44.02; Thu, 10 May 2018 00:44:16 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934404AbeEJHm6 (ORCPT + 99 others); Thu, 10 May 2018 03:42:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:50269 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933589AbeEJHm5 (ORCPT ); Thu, 10 May 2018 03:42:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E8BC9ACB6; Thu, 10 May 2018 07:42:55 +0000 (UTC) Date: Thu, 10 May 2018 09:42:54 +0200 From: Michal Hocko To: Prakash Sangappa 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 Subject: Re: [RFC PATCH] Add /proc//numa_vamaps for numa node information Message-ID: <20180510074254.GE32366@dhcp22.suse.cz> References: <1525240686-13335-1-git-send-email-prakash.sangappa@oracle.com> <20180504111211.GO4535@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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 -- Michal Hocko SUSE Labs