lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Oct 2017 11:09:19 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     "Du, Fan" <fan.du@...el.com>
Cc:     "Hansen, Dave" <dave.hansen@...el.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "hch@....de" <hch@....de>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] Add /proc/PID/smaps support for DAX

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ