VM

Ivo Vachkov ivo.vachkov at gmail.com
Fri Jun 15 07:41:37 UTC 2007


On 6/14/07, cadastrosonline cadastrosonline
<cadastrosonline at yahoo.com.br> wrote:
> "FreeBSD's memory allocation code implements page coloring optimizations, which means
> that the memory allocation code will attempt to locate free pages that are contiguous
> from the point of view of the cache. For example, if page 16 of physical memory is
> assigned to page 0 of a process's virtual memory and the cache can hold 4 pages, the page
> coloring code will not assign page 20 of physical memory to page 1 of a process's virtual
> memory."
>
> From fbsd books, I don't understand why it links page 16 of physical memory to page 0 then talks about page 20 of physcal memory to page 1, ok it will say it will sign to page 21 because of the page coloring, but thats not what i didnt get.
>
> If the cache holds 4 pages, why wouldn't the physical page 20 sign to page 4 or 8 instead? Why 1? lol :> i see its signing the VM as 0,1,2,3,4 and the physical as 4,8,16,20...could anyone explain that?
>
>

I think, if virtual memory page 0 maps on physical memory page 16,
then virtual memory page 1 would map to physical memory page 17 and
that's the main idea. Instead, if you map vm page 1 to phys page 20
this will require cache invalidation on access.

>
>
> ____________________________________________________________________________________
> Novo Yahoo! Cadê? - Experimente uma nova busca.
> http://yahoo.com.br/oqueeuganhocomisso
> _______________________________________________
> freebsd-arch at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"
>


-- 
"UNIX is basically a simple operating system, but you have to be a
genius to understand the simplicity." Dennis Ritchie


More information about the freebsd-arch mailing list