> Chris: Based on your usage patterns, how would Linux know that you were
> going to be opening up Mozilla, and not that you were going to tweak the
> kernel source and compile it again?
Because it would read my mind and figure out what I wanted! ;-)
Maybe it would be possible to have some way to tell the kernel, "I would prefer
this process to be in memory, unless you're running short, at which point you
can swap it out."
This would be very similar to the niceness value, except it would control what
memory gets swapped out. You could tie it in to what processes have been
running, such that if the system goes idle you could start preferentially
swapping back in the processes with the memory niceness set. If you left it at
zero you get the current behaviour (not swapped in until needed) while positive
(or negative, to align with niceness) values would swap that process in
preferentially when the system goes idle.
This would give similar benefits as mlock without actually robbing the kernel of
the ability to swap out under memory pressure.
Does this sound at all useful, or am I blowing smoke?
Chris
-- Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/