Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Nov 2001 17:33:00 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        <ia64@freebsd.org>
Subject:   Region usage
Message-ID:  <Pine.BSF.4.33.0111061712520.79195-100000@herring.nlsystems.com>

next in thread | raw e-mail | index | archive | help
As a quick intro for people new to the architecture, the ia64 VM system
defines eight independent regions, selected by the top three bits of the
virtual address. Each region is essentially a window onto a 61-bit unique
address space - the address space which is mapped depends on the setting
of the appropriate region register (one per region, of course). Extremely
cheap sharing of address spaces is possible by just programming a region
register with the address space identifier of the shared space.

We currently ignore much of this functionality and pretend that we have a
large flat address space. When a process starts, essentially we allocate
five address spaces for the process' own private use. The other three
address spaces are used by the kernel. With some pending changes to the VM
system, we lazily allocate address spaces to the process as needed.

This is not necessarily the ideal way to manage virtual addresses on ia64.
For one thing, there are a limited number of possible address spaces which
can be supported concurrently (itanium allows 2^18, the maximum that any
implementation will allow is 2^24). Also, the default configuration for
ld(1) forces the use of two regions (one for text, one for data) and we
use a third for stack. This is pretty wasteful and leaves only two
regions free for address space sharing.

I can't see any real benefit for using more than one region for most
programs. I think that probably the text section should default to region
zero, offset maxpagesize (pick a value for this, 64k?) with the data
section following in the natural way and the stack starting at the end of
region zero. Does anyone know why the GNU folks chose to put the data
sections in a different region from the text sections?

Note that defaulting to this layout would not stop processes from using
the rest of the address space if they need to - just mmap or whatever as
needed. What it does do is free up as many regions as possible for
application-specific address space sharing (e.g. Oracle).

Comments? Ideas?

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0111061712520.79195-100000>