Skip to contentSkip to conversation

Page coloring HOWTO [ans]

DISCUSSION Colin Plumb 1 participant 1 message Jan 31, 1999

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Larry McVoy

Page allocation becomes hash on virtual address and take a page from the bucket.However, here's the trick that fans them out in the cache, you hash on virtual address plus pid (I don't remember the exact details but you'll get it immeditately when you implement it - you just process 0 to take page 0 from bucket 0, process 1 to take page 0 from bucket 1, and so on).

Um, this is difficult, given that the same virtual->physical mapping may be present in multiple processes. Which pid do I use?

I think that assigning a colour to the vm_area_struct would be better. You *would* have essentially random relationships between the colour offsets of the various vm_area_structs in a process (text, data, stack).

Erm, I just thought of COW issues. which arise because the data segment is mapped COW from the backing file. Do the cow-copied pages have different colour offsets then the pages htey're copied from?

I can see disadvnatages to both possible answers.

Signature · 6 lines
	-Colin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/