dmr@alice.UUCP (05/20/87)
The real reason the u area doesn't move is simply that it contains the kernel stack, and moving it would require relocating addresses in the stack, and possibly other u variables. Given that you don't want to move its virtual location during a swap, on many machines (including the 11) it is better to access it as `u.' rather than as `up->'. On the standard Cray version of Unix the u area is referred to as u-> and moves, but the stack part is exchanged to a fixed location when context switches occur. (The copy uses vector moves, copies only the active stack, and is pretty fast). The people of Chippewa told me that they had a version that did not copy the stack, but instead traced it back and fixed up the frame pointers. They said they found only a few places where stack-relative automatic pointers occurred and the code was readily fixed to avoid the problem. I guess I believe them, but I'm surprised it was so easy. Dennis Ritchie