tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mmap implementation advice needed.



Hi tech-kern,

I'm trying to solve PR#28379 and ran into a problem and I don't really understand how it is supposed to work: If a process tries to mmap for example a file with a length of just over 1GB it will always succeed as I understand the code, but that may not be true depending on the underlying hardware, and I cannot find any way to control this from the MD code...?

On vax, for example, large mmap's cannot be done due to hardware constraints. In the above example it will cause the mmap() to succeed, but when touching the pages it will hang forever since there will never be available pte's.

So, any advice how a max size of allowed mmap'able memory be controlled?

Notes about vax memory management if someone is wondering:
- 2 areas (P0 and P1) of size 1G each, P0 grows from bottom, P1 grows from top (intended for stack). - The PTEs for KVM must be in contiguous physical memory, hence the allocation for one process with all of P0 and P1 mapped takes 128k. - Vax uses VM_MAP_TOPDOWN so that not too much of KVM space is needed for mmap.

-- Ragge


Home | Main Index | Thread Index | Old Index