[lkml]   [1997]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: tmpfs and the VM (Was: Re: questions on page cache and buffers)
In article <>,
Mark Hemment <> wrote:
> First, the page-cache needs to be modified to allow dirty, named pages
>to exist without a VM mapping.

Why? I agree that the dirty page support is pretty broken right now (it
really needs a finer-granularity dirty map), but we do want a VM
mapping. The straightforward way to handle it is to just force a "swap
inode" for all anonymous mappings and allocate it all from there.

Also note that we actually do have the reverse mapping information from
physical pages to virtual pages, although it is non-obvious:

page_map -> inode
inode -> vm_area_list

so to find the virtual copy of a physical page you just look up the
inode, and then follow all mappings of that inode (it's not as costly as
it sounds, really).

That also goes for shared swap inodes.

Note that the "swap inode" wouldn't be just _one_ inode, it would be one
inode per process (or rather, per vm) plus one global one (the global
one is needed for shared anonymous mappings which have global semantics
unlike normal anonymous mappings).

I'm not saying the swap inode is trivial to actually implement, but I
think it is the RightWay(tm) to implement this.

"Pages without VM mappings - just say no".


 \ /
  Last update: 2005-03-22 13:40    [W:0.059 / U:2.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site