Re: [discussion] Swap overcommitment recovery

Itai Nahshon (nahshon@actcom.co.il)
Tue, 18 Aug 1998 01:55:27 +0300


AIX will send the signal SIGDANGER to all processes before actually
killing processes. By default SIGDANGER is ignored.
Processes that have handlers for SIGDANGER are later skipped
when searching for the real victim to kill.

Really, programs which use the standard malloc calls cannot
do much on SIGDANGER but to be nice and exit, or bee bad and
keep all their resources.
With extensions to the malloc library or with a private memory
allocator it is possible to unmap memory pages that are not used
by malloc (AIX has a disclaim() call for that) and free some swap
space. Some garbage collection may be nice too but not always
possible (or fast enough, and garbage collection algorithms may
need more memory just to run).

For Rik's patch:
a. Processes that mmap physical memory
segments may dangerous to kill just like processes that have
direct I/O access. The general trend in hardware design is to
use MMIO.
b. We need an option (per process) that the kernel will allways
commit swap space. Such processes will fail calls to brk, sbrk,
mmap, shmat, shmctl (did I miss anything) if sufficient swap
space cannot be allocated. Such processes will be skipped when
looking for victims to kill. I do not know if that belongs in
the process' personality or elsewhere (does it already exist?)

Itai

-- 
Itai Nahshon   nahshon@actcom.co.il
        Also   nahshon@vnet.ibm.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html