(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/