On Wed, 20 Apr 2005, A.M. Fradley wrote: > From the looks of things, that's how the functions in thrash.c work but > I have no idea how I might create my own verion of these or modify them > for my assignment. Do you know if there's any good documentation of > where these functions are called from? I'm kind of worried now as I > think this is the exact type of thing I think I should have tried to > develop myself but since the experts have already done this, there's > very little left I can do to improve it. The "expert" (that's me) spent 2 hours reading a conference paper, and then a day and a half writing proof of concept code. That proof of concept code ended up helping with some heavy VM workloads, so it got merged into the kernel quite quickly. In short, the mechanism is there, but the policy has received only about 3 hours of my time ;) This means there are a lot of things left to do: 1) the swap token mechanism is bad for performance in very light VM loads, and switched off by default in the upstream kernel - it would be good if the swap token mechanism could detect the VM load and switch itself on and off on demand 2) the policy for moving the swap token between processes is pretty braindead - having a more intelligent policy could probably get big performance gains! 3) the paper linked from mm/thrash.c has some hints on what a better policy could look like - I just never got around to implementing it ;( I have a feeling there is a LOT of interesting research left to do for the swap token mechanism. I'm saying "interesting research" because the actual code needed for most of these policy changes should be relatively small, but the amount of thinking about the problem may need to be big. Of course, I'm always willing to discuss things with you, as long as it's on one of the public mailing lists, so I won't have to have the same discussion with 10 people ;) -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/