Re: 2.1.87 Oopsen

Linus Torvalds (torvalds@transmeta.com)
Tue, 17 Feb 1998 10:40:20 -0800 (PST)


On Tue, 17 Feb 1998, Tim Wright wrote:
>
> Since we now need 2 bits for the PAGE_PRESENT, I suspect changing the value of
> SHM_SWP_TYPE in include/linux/swap.h to 0x20 should work (since MAX_SWAPFILES
> is 8, and this seems to be the other use for the type part, I don't see a
> clash).

This is the correct patch, although as you say there are others. I just
missed the shm case, and I never thought of testing it (I verified that
swapping still works, but didn't run quake ;)

> Alternatively, since the shared memory id and offset are currently
> encoded in 22 bits for a shared memory page, the split could be changed to
> 23:9 from 24:8, but I don't know all the repurcussions.

The correct way is actually to get rid of the SHM_SWP_TYPE completely,
because the vm-area-struct contains enough information to always do the
right thing. But the SHM_SWP_TYPE bit is easy to have, and works well
enough with no real major downsides, so I'm too lazy to clean up that
particular minor wart. Thus the simplest possible fix of just changing the
bit to 0x20 instead of 0x40..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu