Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp194828imm; Thu, 13 Sep 2018 18:45:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdafVwQtWU3qo0E5hrZ/OR1bNcYV/X8fDz2qeDek7LchRDJU6BzFdHawOaZormmuXRMGwoFZ X-Received: by 2002:a63:5b63:: with SMTP id l35-v6mr9479676pgm.50.1536889531323; Thu, 13 Sep 2018 18:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536889531; cv=none; d=google.com; s=arc-20160816; b=Z2sgH7mx+XP8+JcAHZHf3h7QONfEVNq7iLOLt6uHe9njqgU1+erFl/DNbFBT7yo53k JlLd9cvkno/1eO7Egj04oAOnA8zdSaT+0UrTHAUC1zx6dxJscUFB8LaqGv4BY6BgNOUG Pd4sGAtcOCCJuEXvm3ZIaWqMxJNxODQe5j6IlQhkL3LzCwe7qj/49CC+WNYZaDpujXF1 rceWC3srRaAGhPOVR8hSbh64We8i1D6aLwdnpXxNsmS2rZ5JXeEaNOb2K53sYxF0LuOq fZL+lqqKl8VE5sPlPV0f29fTpDUkP6Rx6zXAHftZvX0/AqBHLWKD/aWCawx/5lnRDKYq a/eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BcZFk35HS34jGXkVQdUbdiMbpUGHpuZeaJjw92PAa7g=; b=U+7s+0aeXF9f8a9he0AlezdkJPbmLcXuENUFQsU106h1vE4Ub7ahRI91bRvDjmZY6K DIsc6cnnpc5hV1X0vJNPOTCqogmLoSUnCWTLKkL3ToSWwviU+M35+HraUhSKnRnwbhhr 61gU1JHP7NH2RAX1FqFAuFjrGGW9GIMD3MQerGY2Q0l+3RmcFH9XoG0aGvqquXwiuRxS 7mc7BERrM3F/HubSn8XncrzHkmWshwfVZgsUM2jhqn9EPbl9PxOlxisZ8Vu7+MfwHVfb OJPXmotJqk6uZ63abhPtj4pEsLIuSnxftIAU7KI1CE8wG3BdudgOkFEVfAErNgs5dEnL y+Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=l1R4QWbx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 35-v6si5640375pgz.453.2018.09.13.18.45.02; Thu, 13 Sep 2018 18:45:31 -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=@google.com header.s=20161025 header.b=l1R4QWbx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728244AbeINGp5 (ORCPT + 99 others); Fri, 14 Sep 2018 02:45:57 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:38849 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbeINGp4 (ORCPT ); Fri, 14 Sep 2018 02:45:56 -0400 Received: by mail-ot1-f65.google.com with SMTP id n5-v6so3106131otl.5 for ; Thu, 13 Sep 2018 18:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BcZFk35HS34jGXkVQdUbdiMbpUGHpuZeaJjw92PAa7g=; b=l1R4QWbxyCjOXvaaVoLxosMlNPx99WkAeT1AzqRjps8elb+gr22hb32EOXAx/4svto PrvCAbMIql6e8s48Gvg/yAqVIlEmxxjDBQxbk4CXsX81riDCN8uITiX9WzSoQ/4uhOAs SsiJb3JMoenKDl4qgCNK6F0TN4iw0o/ekOpJGiRPm0HETqDdzMeAoQQAPUjQM04dJ/7F 41uyE0odt9TEqElxoLQYHBzoIDZFuGMjTmMP6YTv7Tdj4r7L3Bra8VV3Bvu1b6mH/FTx LKxYJi0HkxQzUnPFhQOyel6rFGgAiM1JZ5fpnX3mE30DYNgvUKhXIHzjbIee6fWzhvCp HfGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BcZFk35HS34jGXkVQdUbdiMbpUGHpuZeaJjw92PAa7g=; b=HemP8uoUXf8HmjNwQEGOmSfqYXb2dLPEN2M/W4sHa+zqV4SLtSRXjZuhYuc+llWpJN Ro7YLqlRQHf5Fgs0OJCrHZlXJ2v/+L4DGNodEuoS4+UwAnsQ++ZcxMzRUJ1eIE9/JRkO 3941kD1y7Xy8zflz+1CC9uFPC5d11/z+E53KR9IgoKb51lOXyuIVsgnhT66gmlFh9fUF NzbwAHEGzP2wb1pEMS7xF9LLu0h2LFHcK7294m2mJR+iDzK2F/FbLplbLNirVj7sDgCH 8YUZO1giUobDDnNRrqCNReUQzdNtQ5XVqlg4oGMvdujszy0R5Ip1sTV/Vsr7UvmkXeO0 4/NA== X-Gm-Message-State: APzg51D4WdHWzMPwn2/AHBanxHh4nyNo5za2zkp6YWbXKQ7/hGWWCGLX nh9D/xV2rP/FEFOvdFO7oi/+tBbVQRP+JrhX87rh1g== X-Received: by 2002:a9d:3b42:: with SMTP id z60-v6mr3181752otb.32.1536888834333; Thu, 13 Sep 2018 18:33:54 -0700 (PDT) MIME-Version: 1.0 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> <94ee0b6c-4663-0705-d4a8-c50342f6b483@oracle.com> In-Reply-To: <94ee0b6c-4663-0705-d4a8-c50342f6b483@oracle.com> From: Jann Horn Date: Fri, 14 Sep 2018 03:33:28 +0200 Message-ID: Subject: Re: [RFC PATCH] Add /proc//numa_vamaps for numa node information To: Prakash Sangappa Cc: Dave Hansen , Anshuman Khandual , Andrew Morton , kernel list , Linux-MM , Linux API , Michal Hocko , "Kirill A . Shutemov" , n-horiguchi@ah.jp.nec.com, drepper@gmail.com, rientjes@google.com, nao.horiguchi@gmail.com, steven.sistare@oracle.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 12, 2018 at 10:43 PM prakash.sangappa wrote: > 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 procfs files should use PTRACE_MODE_*_FSCREDS, not PTRACE_MODE_*_REALCREDS.