page coloring implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm interested in implementing a page coloring mechanism in 2.6.1 (mostly fun). I have a few questions though.

In "UNIX(R) Systems for Modern Architectures", there is a function to calculate the number of colors, which is

num_colors = cache_size/(associativity*page_size).

However, I have trouble understanding why they did this because it implies that the number of sets/rows per color is

num_sets_per_color = page_size/linewidth

since the standard sets/rows calculation for cache is

num_rows = cachesize/(linewidth*associativity)

Doesn't this mean that many addresses within a page will possibly result in a lot of cache conflicts?

---------------------------------------------------------

Second, I think that if number_of_colors = num_rows, because thre would be less chance of cache conflicts within a page (assuming that one was trying to map a single process to different colors)?

-----------------------------------------------------------------------------------------------------------

Second, a clarification mostly, implementing this would mean I'd have to try and handle external fragmentation somehow, because this page allocator would take the place of the buddy allocator algorithm, right?

Thanks,
Tim



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux