[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod4kefNWPAwKZdpO8z29sJ2jDh74_C5Y_FSgXFB8s5ZXGA@mail.gmail.com>
Date: Thu, 8 Apr 2021 14:33:43 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Daniel Xu <dxu@...uu.xyz>
Cc: bpf <bpf@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Kernel Team <kernel-team@...com>, jolsa@...nel.org,
Johannes Weiner <hannes@...xchg.org>,
Yonghong Song <yhs@...com>
Subject: Re: [RFC bpf-next 0/1] bpf: Add page cache iterator
On Wed, Apr 7, 2021 at 2:47 PM Daniel Xu <dxu@...uu.xyz> wrote:
>
> There currently does not exist a way to answer the question: "What is in
> the page cache?". There are various heuristics and counters but nothing
> that can tell you anything like:
>
> * 3M from /home/dxu/foo.txt
> * 5K from ...
> * etc.
>
So, you need the list of inodes for a filesystem that are in memory.
With that list, you can open, map and do mincore on them?
I don't know of a way to get that inode list.
> The answer to the question is particularly useful in the stacked
> container world. Stacked containers implies multiple containers are run
> on the same physical host. Memory is precious resource on some (if not
> most) of these systems. On these systems, it's useful to know how much
> duplicated data is in the page cache. Once you know the answer, you can
> do something about it. One possible technique would be bind mount common
> items from the root host into each container.
>
Oh you want to share page cache between different containers/jobs?
That would complicate charging.
Powered by blists - more mailing lists