[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33978ec2-ac27-1b8b-ba33-3bd2c66aa016@yandex-team.ru>
Date: Mon, 28 Oct 2019 14:20:51 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Michal Hocko <mhocko@...e.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Johannes Weiner <hannes@...xchg.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Roman Gushchin <guro@...com>
Subject: Re: [PATCH RFC] fs/fcntl: add fcntl F_GET_RSS
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.
Powered by blists - more mailing lists