Quoting Arjan van de Ven <arjan@xxxxxxxxxxxxx>: > > > OK, this seems interesting. What if no task has the swap token, would > that > > mean > > that either virtual memory is not being used at the time or that all the > tasks > > have the pages they need already swapped in? Either way, the swap token > thing > > is something I can look into. > > I suspect it means that there is not enough VM pressure to cause any > type of paging. I wasn't saying I'd come accross a situation where that happened. I was just asking if that's possible for it to happen. It seems this is a fairly new addition to the kernel that Rik van Riel came up with towards the end of last year. The info I found on it was http://lxr.linux.no/source/mm/thrash.c?v=2.6.10#L79 in which it's saying that it's incomplete and then there's a patch that he came up with here: http://www.ussg.iu.edu/hypermail/linux/kernel/0412.2/0670.html > on second thought the best measure you could work from I suspect is the > rate of hard page faults..... the kernel keeps that information > somewhere (I just forget where) but it's a pretty reasonable indication > of memory pressure. >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. I should probably look into alternative ways of doing the same thing, but most of the other ideas I had would either not be as good or hinder the operation of this method of controlling the swaps. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/