> > > Possibly stupid suggestion... Maybe the interactive/GUI programs
> > > should wake up once in a while and touch a couple of their pages?
> > > Go too far with this and you'll just get in the way of performance,
> > > but I don't think it would hurt to have processes waking up every
> > > couple of minutes and touching glibc, libqt, libgtk, etc so they
> > > stay hot in memory... A very slow incremental "caress" of the
> > > address space could eliminate the
> > > "I-just-logged-in-this-morning-and-dammit-everything-has-been-paged
> > >-out" problem.
> >
> > Ugh... Ouch.... Ugly, indeed.
> >
> > What you might want to do is
> >
> > while true; do
> > cat /usr/lib/libc* > /dev/null; sleep 1m
> > cat /usr/lib/qt* > /dev/null; sleep 1m
> > ...
> > done
> >
> > running on your system...
>
> 90%+ of what you touch that way is likely to be outside your working
> set, and only the libraries get pre-loaded, not the application code or
> data. An approach where the application 'touches itself' has more
> chance of producing a genuine improvement in response, but is that
> really what we want application programmers spending their time
> writing? Not to mention the extra code bloat and maintainance
> overhead.
Application touching itself would be *evil*.
You might extend my approach if something like
if ps | grep gimp; then cat /usr/bin/gimp > /dev/null; fi
or something like that. It is definitely less evil than gimp doing it
itself.
> Maybe there are a some applications out there - perhaps a database that
> for some reason needs to minimize its latency - where the effort is
> worth it, but they're few and far between. IMHO, only a generic
User programs should *never ever* do unneeded work. Touching itself is
unneeded and evil for memory managment.
> This is firmly in the flight-of-fancy category. What would be real and
> worth doing right now is for some application developers to profile
> their wonderful creations and find out why they're touching so darn
> much memory. Who hasn't seen their system go into a frenzy as the
> result of bringing up a simple configuration dialog in KDE? Or
> right-clicking one of the window buttons in Gnome? It's uncalled for,
> a little effort on that front would make the restart latency problem
> mostly go away.
Agreed.
Pavel
-- The best software in life is free (not shareware)! Pavel GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+ - 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/