On Friday, 27 March 2015 at 09:44:27 UTC, Walter Bright wrote:
On 3/27/2015 1:41 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?=
On Friday, 27 March 2015 at 08:25:26 UTC, Walter Bright wrote:
The MMU makes it pointless. The virtual address space allows
for 4 billion
goroutines with 4 billion bytes each of stack.
If you fragment the memory space you cannot use recursive page
tables? If you
want to address more than 512GB you need to move to 1MiB pages.
So what? The point is there is PLENTY of virtual address space.
You can "allocate" absurd amounts of address space for each
goroutine, and still have plenty without physically moving
If you don't care about performance, bloated page tables and
laying waste to memory:
1. Page tables are hierarchical, to save space nodes can point
back to themselves. IFF the node is similar. Throwing shit all
over the memory space makes this impossible. So you get BLOATed
2. All dirty pages maps to physical memory. So one recursion
chain on a fiber will create a big physical mem allocation. To
get rid of it you would have make a slow syscall.
3. You have no way to go below the page size for a stack.
4. Operating system calls like mmap are slow.
5. Trapped pages are slow and so are modifying page tables.
6. You cannot expect to get more than 47-53 bits of address space
from the OS. It's not like 64 bits CPUs provide 64 bits address
space. There is a big hole in the middle.
Have you actually thought about these issues or done performance