> Jamie Lokier wrote:Yes, unionfs does copyup whole files, but it doesn't lock the entire file into the page cache. But I agree, that copying up large files to a tmpfs partition adds more memory pressure, at least temporarily (until pdflush kicks in). If I understand you right, you want to copyup one page at a time, right? That's not nearly as easy as one might imagine. First, you can't do it on file systems which don't support holes. Second, holes is a file-systems specific implementation issue, and the knowledge of holes AFAIC, is hidden from the VFS (IIRC, FreeBSD has a specific "zfod" page flag, which is turned on when the VM has a page that came out of a f/s hole). You'll need a way to tell if a given page was copied up or not, and distinguish b/t pages which are naturally filled with zeros vs. those which came from f/s holes. Copyup is also providing persistency: you can copyup to a persistent f/s such as ext2. So you'll need a bitmap or some sort of record that will survive file system remount and system reboot; such a bitmap will have to tell which pages of a file have been copied up or not. I'm not saying it's not possible, but it's to do this page-wise caching at a stackable layer than inside a native f/s such as ext2. Now, if there was a generic VFS op that allowed me to query a file system whether a page it a given file is a hole or not, then unionfs would be able to do page-wise copyup easily. Frankly, I think something like support for a copied-up file, page-by-page, should probably be supported by a block layer virtual driver (this might be easier in a BSD-like geom layer.) BTW, I believe FSCache has page-wise caching, right? Caching is a copy-on-read operation, and it doesn't take much to make it cache (read: copy) on writes. So FScache might be a good starting point for such an effort. I think a union-tmpfs is a better solution than a cramfs-specific one, b/c at least with union-tmpfs, many more users could use it. Even if you restrict yourself to using tmpfs as the r-w layer, and read-only from just one other source f/s, that still will cover a large portion of unioning users. Cheers, Erez. --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Michael Opdenacker | [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker.c compiling |
git: | |
| David Miller | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
