Re: New syscall (rough draft), swap_out_pid()

George (greerga@nidhogg.ham.muohio.edu)
Tue, 17 Mar 1998 17:19:56 -0500 (EST)


On Tue, 17 Mar 1998, Rik van Riel wrote:

>On Tue, 17 Mar 1998, Balaji Srinivasan wrote:
>
>> I dont think this would work as you expect it to...as swap_out_process
>> does not swap_out the whole process, but just one page...am I wrong here?
>
>No, your completely right... What would work is:
>while (p->mm->rss) {
> int gfp = GFP_SWAPOUT_NOW_YOU_DAMNIT;
> swapout_process(p, gfp);
>}

(I know it doesn't throw the whole thing out, I watched it work.) :)

Is it safe to assume that while this code is running, the program will not
be run and try to be swapped back in? I thought about that but wasn't sure
if the kernel could get into a swap-fight with one part (swap_out_pid)
throwing the program out and the page faults bringing it back in. Doesn't
sound likely but I suppose the worst that can happen is I lock my machine
up. :)

I'll clean up it and see what I can do. Any idea what GFP_ it should use
or is 0 adequate?

-George (who doesn't like wasted memory when it could be a cache)

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