Anonymous Pages

do_anonymous_page is invoked to map pages not associated with a file as a backing store. Except that no data must be read into a page, the procedure hardly differs from the way in which file-based data are mapped. A new page is created in the highmem area, and all its contents are deleted. The page is then added to the page tables of the process, and the caches/MMU are updated.

Notice that earlier kernels distinguished between read-only and write access to anonymous mappings: In the first case, a single, global page filled with zero bytes was used to satisfy read requests to anonymous regions. During the development of kernel 2.6.24, this behavior has, however, been dropped because measurements have shown that the performance gain is negligible, while larger systems can experience several problems with shared zero mappings, which I do not want to discuss in detail here.

Continue reading here: Copy on Write

Was this article helpful?

0 0