Re: Is anonymous memory part of the page cache on Linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 12, 2021 at 04:41:55PM +0100, Peter Weber wrote:
> Thank you Matthew!
> 
> 
> Am 2021-03-12 16:15, schrieb Matthew Wilcox:
> > The wikipedia diagram is wrong.  Anonymous memory is not handled by the
> > page cache.
> 
> Is it roughly right to say, that the virtual memory uses page tables to
> handle anonymous memory?

I tend to deal with page cache and not anonymous memory, so I'm not sure
exactly how someone who's an expert would phrase it.  Anonymous pages are
"handled" in a number of different ways -- they can be found on LRU lists
and they can be found through the page tables.  It's all a bit ad-hoc as
far as I can tell ;-)

> > Anonymous pages enter the storage stack via swap; they are
> > found in the page tables, sent to the swap cache and then written to
> > swap devices or swap files.  Filesystems may get involved at that point,
> > but not always.
> 
> And the page cache doesn't handle anonymous memory - even when it is
> swapped?

Right.  There's a swap cache, but that's not the same thing as the page
cache.

> > There are other weird things in the wikipedia diagram, like Direct I/O
> > being seemingly detached from applications, and not appearing to pass
> > through the VFS.
> 
> I'm not an expert. Maybe I should add at least note about that on Wikipedia?

Maybe!




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux