Skip to contentSkip to conversation

"Swap in" an entire process?

DISCUSSION Konstantin Kudin 2 participants 2 messages Feb 25, 2004 – Feb 27, 2004

lore
Share & tools
lore
#0 lore raw

I have a question. Is there some way under linux to
"swap in" an entire process that got partially swapped out?

Basically, I want all the pages for a given PID
returned to RAM if they were paged out.

And vice versa, is there a way to "swap out" a
process by some command?

Thanks!

Konstantin

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Konstantin,

Quoted 6 lines · Konstantin Kudin

I have a question. Is there some way under linux to
"swap in" an entire process that got partially swapped out?

Basically, I want all the pages for a given PID
returned to RAM if they were paged out.

The process to swap in can do that with mlockall().

Quoted 2 lines

And vice versa, is there a way to "swap out" a
process by some command?

No, but munlockall will allow it to be swapped
again. It will swap out while sleeping gradually, since it dirties no pages at all.

But there is no external trigger mechanism for this in Linux right now.

Regards

Ingo Oeser

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAPuw8U56oYWuOrkARAicaAJ9UlEjG79mSmEhYfYgrQHeKRayHcQCg33oZ fxMdDl4zJ2eqkenp7oIFk0U=
=uZpu
-----END PGP SIGNATURE-----