Re: Page coloring HOWTO [ans]

Chuck Lever (cel@monkey.org)
Sat, 30 Jan 1999 17:58:39 -0500 (EST)


is it necessary to prevent collisions between kernel pages and process
pages, or doesn't that matter? if you allocate by adding the pid to the
address, do you just make up an arbitrary pid when allocating for the
kernel? i'm pretty new to this, so please excuse if this is an obvious
question.

(btw, i'm in favor of an efficient always-on algorithm, as described here)

On Sat, 30 Jan 1999, Larry McVoy wrote:

> This alg will do two critical things:
>
> (a) make sure that each process maps the same virtual addresses to
> different locations in the cache, if possible.
> (b) make sure that a contiguous chunk of virtual address space in
> one process occupies a contiguous chunk of cache, if possible.
>
> The first thing you do is to take your page free list and turn it into a
> hash list, where the # of buckets in hash list is your cache size divided
> by page size.
>
> Then take each page, hash on physical address, stick it in the appropriate
> bucket.
>
> 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).

- Chuck Lever

--
corporate:	<chuckl@netscape.com>
personal:	<chucklever@netscape.net> or <cel@monkey.org>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/