On Sun, 2005-04-17 at 14:10 +0100, A.M. Fradley wrote: > I'm not sure if it's much different to the swap token thing. What area should > I > look in for that if I want to get data from there to the scheduler? has_swap_token(current->mm) is the function you want. The basic idea behind the token is that only one task at a time has the token, and that the task with the token is "protected" from swapping, so that it can make actual progress, and that it is made to pass this token on to some other task after a fixed amount of time; this to prevent the situation where no tasks make actual progress in a heavy swapping situation due to the tasks stealing the memory from eachother all the time. By giving the tasks one at a time a period of "immunity" at least one can make progress. For your work it might be interested to investigate if giving this special task more CPU time is an interesting thing to do. > from the scheduler. My plan was that as the ram gets full (I chose 90% or above > to start with) then the page swapping must have started. in linux ram will always be "full" as seen by sysinfo because of the disk cache. The kernel actually keeps swap related statistics (just run "vmstat 1" in userspace and you see so/si blocks), that is the information you most likely would be interested in. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/