lkml.org 
[lkml]   [2019]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] fs/fcntl: add fcntl F_GET_RSS
From
Date
On 28/10/2019 14.10, Matthew Wilcox wrote:
> On Mon, Oct 28, 2019 at 01:28:09PM +0300, Konstantin Khlebnikov wrote:
>> + if (dax_mapping(mapping))
>> + pages = READ_ONCE(mapping->nrexceptional);
>> + else
>> + pages = READ_ONCE(mapping->nrpages);
>
> I'm not sure this is the right calculation for DAX files. We haven't
> allocated any memory for DAX; we're just accessing storage directly.
> The entries in the page caache are just translation from file offset to
> physical address.
>

Yep, makes sense. If RSS declared as memory usage then this chunk must do
pages = READ_ONCE(mapping->nrpages) unconditionally and report 0 for DAX.

\
 
 \ /
  Last update: 2019-10-28 12:21    [W:0.854 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site