Subject: UVM optimalisations / remarks
To: None <tech-kern@netbsd.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 03/17/2002 19:31:00
Dear all,
just reading the UVM dissitation and I noted the following remark om page
11 :
``This (backing object for a page) is usually a file or `zero-fill' memory
wich means that the area should be filled with zeroed memeory as its
accessed. (....) For zero-fill memory, the copy-on-write flag doesn't
matter''
I disagree with this ... why shouldn't zero filled memory be backed with
just *one* by all processes shared R/O page when it faults for reading that
uses copy-on-write to get a private one if something changed ?
Is this allready done in UVM ? or is it explained later on ? seems spilling
pages otherwise.... if a process would only just _READ_ that memory it
would get heaps of zeroed memory pages ... where it could be just one zero
page it reads over and over again ... writing one of the pages then gives a
new fresh page for its modifications.
I dont know how our `calloc' works but maybe that could be integrated too ?
since you _know_ that those pages are zero anyway.
A further optimalisation could even be to check if the page is zero still
and rename that page to the anonymous _one_ page when memory gets tight ...
Cheers,
Reinoud
(trying to understand UVM/pmap better)