Re: writable swap cache explained (it's weird)

Linus Torvalds (torvalds@transmeta.com)
Thu, 30 Jul 1998 20:05:36 -0700 (PDT)


On Thu, 30 Jul 1998, Alan Cox wrote:
> It would be better to fix DOSemu. Firstly about 2/3rds of the DOSemu uses
> seem to be fixable now we have mremap(). The others - aliasing emulations
> are less funny but could be messily done with sys5 shm.
>
> 2.0.x question - why did this work ok in 2.0 (did it in fact work ok in 2.0)

It has never worked correctly, and I think the thing is that the warning
is new to 2.1.x.

It _almost_ works. Problems crop up when you are low on memory, and a page
gets paged out - a page that used to be shared gets essentially
"duplicated" into two private pages by the page-out.

There used to be code that refused to page out pages with a count > 1, and
I can't remember offhand whether that test was in 2.0.x or not. I know
it's not in current kernels, the problem being exactly that with the test
you can create a major security issue by essentially locking down infinite
amounts of pages..

(I just checked, the test for page->count != 1 doesn't seem to be there in
2.0.x either, but I might have forgotten exactly where it used to be..)

Linus

-
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.altern.org/andrebalsa/doc/lkml-faq.html