How to disable/limit pixmap cache in X
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Thu Sep 20 14:26:09 PDT 2007
On Thu, 20 Sep 2007 10:02:32 -0500 "Jim Kronebusch" <jim at winonacotter.org>
babbled:
simple answer: no. it's impossible. how do you know how much ram x will need
over its lifespan? you don't need the kernel to do such things. if you knew you
will never need more than X MB then alloc X MB, actually touch all the pages
pf that allocation to makes sure they have been paged in and allocated real
pages, mlock() it in and from then on allocate all memory from this pool you
created. but the main problem is - what is X? you just will never know.
> Okay, I'm going to take a step back here and try a different line of thinking
> on this. Xserver and Xclients currently don't have a decent way to talk to
> each other and implementation of this is not an easy task. We can run
> certain patches or band-aids as a work around or try and configure Xclients
> to not be so greedy, but that is some work as well and not pretty. The
> problem still stands that an Xclient and Xserver have full ability to request
> all available RAM and see who wins. But in the end if the Xserver runs out
> of memory to use, everything crashes and your session is over. So it seems
> it is most important to be sure the Xserver always has the memory it needs to
> run. This brings me to my thought. Is it possible to modify the Linux
> kernel (or whatever process would be best to control this) to check on
> startup if an Xserver is present, and if yes set aside RAM for only the
> Xserver which would guarantee the Xserver will always have the resources it
> needs to function. Then take the remaining amount of RAM and allocate it as
> "free" memory for other processes to use. Could this guarantee stability of
> the desktop without needing any form of communication between the Xserver and
> Xclient? Then if a developer develops an Xclient that is greedy, so what, it
> performs poorly or crashes as it normally would, but the desktop still runs.
> This would then keep the Linux desktop stable and put pressure on the
> developer to optimize their application to make it more stable or perform
> better.
>
> Forgive my ignorance on the topic if this is way off base.
>
> Jim
>
> --
> This message has been scanned for viruses and
> dangerous content by the Cotter Technology
> Department, and is believed to be clean.
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)
More information about the xorg
mailing list