Skip to contentSkip to conversation

guarantee_memory() syscall?

DISCUSSION Raul Miller 4 participants 4 messages Oct 29, 2000

lore
Share & tools
lore
#0 lore raw

Can anyone tell me about the viability of a guarantee_memory() syscall?

[I'm thinking: it would either kill the process, or allocate all virtual memory needed for its shared libraries, buffers, allocated memory, etc. Furthermore, it would render this process immune to the OOM killer, unless it allocated further memory.]

Thanks,

Signature · 5 lines
Raul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw
Quoted 6 lines · Raul Miller

Can anyone tell me about the viability of a guarantee_memory() syscall?

[I'm thinking: it would either kill the process, or allocate all virtual memory needed for its shared libraries, buffers, allocated memory, etc. Furthermore, it would render this process immune to the OOM killer, unless it allocated further memory.]

Except for the OOM killer semantics mlockall already exists.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to Raul Miller
Quoted 5 lines

Can anyone tell me about the viability of a guarantee_memory() syscall? [I'm thinking: it would either kill the process, or allocate all virtual memory needed for its shared libraries, buffers, allocated memory, etc. Furthermore, it would render this process immune to the OOM killer, unless it allocated further memory.]

Hack mode on:

Allocate an array of pages the required size and attach them to a process via a device and mmap(). Basically you are just wanting to do private unswappable pages so grab free pages in kernel memory and mmap them

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Eric W. Biederman
Quoted 10 lines · Eric W. Biederman
Quoted 6 lines · Raul Miller

Can anyone tell me about the viability of a guarantee_memory() syscall?

[I'm thinking: it would either kill the process, or allocate all virtual memory needed for its shared libraries, buffers, allocated memory, etc. Furthermore, it would render this process immune to the OOM killer, unless it allocated further memory.]

Except for the OOM killer semantics mlockall already exists.

More to the point, "immortality" is NOT a desirable "feature": the OOM killer just kills things which must be killed to protect the overall system. We'll have a finely adjustable memory killer daemon soon, which will be a better solution.

James.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/