Messages in this thread |  | | | Date | Sun, 27 Sep 1998 18:28:55 -0400 (EDT) | | From | Ion Badulescu <> | | Subject | Shared mmap write-out (was: Re: patch cow-swapin) |
| |
On Sun, 27 Sep 1998, Andrea Arcangeli wrote:
> On Sun, 27 Sep 1998, Ion Badulescu wrote: > > >Here is a small program which will demonstrate the bug. Change the FILESIZE > >value so it won't kill your machine, make sure you have enough disk space > >(and no file called "foo"), then start it and watch the "bo" column of a > >"vmstat 1". > > We are working on the "si" column. I' ve checked that the "si" column > is always 0 with the new experimental smart swap cache code (2.1 only).
Right, I know. But the problem is similar, that is, the parent doesn't know what the child is doing with pages in their shared mapping. This time it's not even COW, it's a shared mapping altogether..
> Yes bo is full with 2.1 too, but I have not read your source and so I don' > t know if this is the right behavior.
In short, here is what the program is doing:
1. create a large file 2. mmap it read/write shared 3. touch all pages in the mapping once, never touch them again 4. fork, then the child execs "/bin/echo", at which point the kernel fsync's the large file (why? this is question no. 1) -> lots of disk activity 5. goto 4
So, question no. 2: why is the disk activity happening for *each* child, although the pages are *never* touched again? They are part of the page cache according to /proc/meminfo, so they should be marked non-dirty once they're first flushed to the disk, and then nothing else should happen.
Thanks, Ion
-- It is better to keep your mouth shut and be thought a fool, than to open it and remove all doubt.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |