On Tue, 2006-10-03 at 14:20, Lei Jin wrote:
> Gaurav,
> 
> coloring algo is to direct the page allocation so that we could reduce L2 
> cache conflicts.
> 
> I have another question. If I want to modify the coloring algo in kernel, 
> where shall I start?
> 
Lei,

The algorithm is controlled by the AS_2_BIN macro and thus is a logical
place to start.  This macro is only called in a few places as well, so
you could just go there and modify the code to set bin appropriately as
well if for some reason AS_2_BIN does not meet your needs in terms of
parameters ...  I still think it'd be better to just add extra
parameters to AS_2_BIN if needed though and use them just for your new
algorithms.

Also, in case I'm answering the wrong question, the variable
consistent_coloring is set to the policy that we want to use:

/*
 * AS_2_BIN macro controls the page coloring policy.
 * 0 (default) uses various vaddr bits
 * 1 virtual=paddr
 * 2 bin hopping
 */

So, if you just want to change that, add a line to /etc/system to set it
to the value you desire.

Hope this helps,

Mike

> Lei
>  
> 
> This message posted from opensolaris.org
> _______________________________________________
> opensolaris-code mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to