Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Wed, 9 Feb 2000 19:30:58 +0000 (GMT) | Subject | Re: how does kernel get the "current" task struct? |
| |
Hi,
On Tue, 8 Feb 2000 13:01:44 +0100, Jamie Lokier <lkd@tantalophile.demon.co.uk> said:
> Linus Torvalds wrote: >> The zones have to be aligned, there's no question about that. The >> preferred alignment is in the megabyte range, rather than in individual >> pages. In fact, I would suggest always making sure that it is aligned to >> the largest order that get_free_page() supports, and I think that's true >> of all current architectures..
> I don't see why it's necessary though. The allocator should simply use > absolute address values for pairing instead of zone-relative > addresses.. is there anything more to it than that?
Yes --- you need 8k allocations to be 8k-aligned physically, and 64k allocations to be 64k-aligned, etc. Just to think of one example, Intel MTRR absolutely requires that the address of a memory range is a multiple of the size of the range, and you need aligned zones to create such regions.
This needn't be a problem --- you can easily create a zone aligned at a large (eg. 16MB) granularity, without filling it with free pages. As an example, the low-memory zone doesn't populate the free page list with pages in the 640k-1M hole. Just because your physical page region isn't aligned nicely doesn't mean you cannot align the zone itself.
--Stephen
- 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/
| |