From: Michal Hocko <mhocko@kernel.org>
To: "Du, Fan" <fan.du@intel.com>
Cc: "Hansen, Dave" <dave.hansen@intel.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"hch@lst.de" <hch@lst.de>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] Add /proc/PID/smaps support for DAX
Date: Fri, 27 Oct 2017 11:09:19 +0200 [thread overview]
Message-ID: <20171027090919.g3aa2wuwacrl23oe@dhcp22.suse.cz> (raw)
In-Reply-To: <5A90DA2E42F8AE43BC4A093BF06788481AA5188F@SHSMSX104.ccr.corp.intel.com>
On Fri 27-10-17 09:03:12, Du, Fan wrote:
[...]
> >I am not deeply familiar with DAX but I would expect that most users
> >will use a FS on top of it where we have standard tools. If the use is
> >direct then I can see how this make things more complicated but smaps is
> >not the right answer IMHO. Why? Well, just consider that you map the
> >same portions of the device multiple times for whatever reason and you
> >are screwed because you have no means to distinguish those. So you will
> >get bogus numbers. Or am I misunderstanding something?
>
> Persistent memory has two user interfaces.
> One is filesystem DAX, sitting on pmem block device, mounted with dax option to
> by pass page cache, `df` could meets my customer needs.
> The other is device DAX, where user could only mmap it to its address space,
> No file system concept. That's why we need something equivalent with `df`.
>
> Share mappings increase page mapcount, that's what PSS field for.
> It will proportionate the total size, for example the library(2MB) used by two
> processes, RSS will report 2MB plus each process own memory size,
> where PSS report the proportionally one, 2MB/2(two processes
> share the library, the page mapcount is 2) plus its own memory size.
>
> Btw, smaps is the best place to be compatible with existing online monitoring tools
> customer use now a days.
But you cannot touch rss and pss because you are going to break existing
users as Dave already pointed out. So you need something special.
Accounting page tables sounds like an interesting approach but you will
have no idea about sharing and so you are back to square one.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2017-10-27 9:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 0:27 [PATCHv3 1/2] proc: mm: export PTE sizes directly in smaps Fan Du
2017-10-25 0:27 ` [PATCH 2/2] Add /proc/PID/{smaps, numa_maps} support for DAX Fan Du
2017-10-25 9:30 ` Michal Hocko
2017-10-25 17:14 ` Dave Hansen
2017-10-26 14:16 ` Michal Hocko
2017-10-26 14:24 ` Dave Hansen
2017-10-26 14:31 ` Michal Hocko
2017-10-26 14:51 ` Dave Hansen
2017-10-26 15:07 ` Michal Hocko
2017-10-26 15:56 ` Dan Williams
2017-10-27 4:00 ` Du, Fan
2017-10-27 10:31 ` Dan Williams
2017-10-28 2:07 ` kbuild test robot
2017-10-25 9:28 ` [PATCHv3 1/2] proc: mm: export PTE sizes directly in smaps Michal Hocko
2017-10-26 1:41 ` Du, Fan
2017-10-26 5:13 ` [PATCH v4] Add /proc/PID/smaps support for DAX Fan Du
2017-10-26 9:16 ` Dan Williams
2017-10-27 2:49 ` Du, Fan
2017-10-26 14:03 ` Dave Hansen
2017-10-27 2:47 ` Du, Fan
2017-10-27 8:07 ` Michal Hocko
2017-10-27 8:24 ` Du, Fan
2017-10-27 8:42 ` Michal Hocko
2017-10-27 9:03 ` Du, Fan
2017-10-27 9:09 ` Michal Hocko [this message]
2017-10-27 9:17 ` Du, Fan
2017-10-27 9:26 ` Michal Hocko
2017-10-27 9:34 ` Du, Fan
2017-10-26 14:19 ` [PATCHv3 1/2] proc: mm: export PTE sizes directly in smaps Michal Hocko
2017-10-26 14:25 ` Dave Hansen
2017-10-29 14:19 ` [lkp-robot] [proc] eb948c71f7: WARNING:at_mm/hugetlb.c:#hugetlb_add_hstate kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171027090919.g3aa2wuwacrl23oe@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=fan.du@intel.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®