lkml.org 
[lkml]   [1998]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New syscall (rough draft), swap_out_pid()
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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.050 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site