OK I can now confirm that the problem is in the KMS.
After nearly the same time of uptime as in my previous post, but now without KMS there is no mysterious memory usage.
I found out that after long using of Okular (for reading PDFs while learning for exams), memory usage of X server goes up to 300 MB instead of normal 50-100 MB. But, in a non-KMS environment, after closing the Okular, memory is freed, and X memory usage drops to cca 100 MB. After restarting the X server, global memory usage of my system drops to cca 360 MB, which is the same as in the first boot.
On the other hand, if I enable KMS, while using Okular, X doesn't allocate a lot of memory (it stays down to around 50 MB or even less), but the global system memory usage continues to grow in the same amounts as without KMS. The problem is that after closing Okular, this memory is not freed, not even after restart of the X.
So my guess is that some applications, like Okular, use some of X's properties related to mode setting, which in return allocate a lot of memory. The problem is that, when mode setting is not in userspace, this memory cannot be freed by an userspace process. The problem doesn't appear with KMS disabled, as mode setting code is obviously in userspace.
As far as I know, a friend of mine has a similar problem on a Intel graphic card, so my conclusion is that this is not a driver-related problem, or is it?
So, do you have a similar problem on your Fedora installation? Does this problem appear on other KMS-enabled distros (etc. Gentoo)?
Tell your problems here, so X and kernel developers (who are common guests on Phoronix forums) will have easier time finding and fixing the bug.
Later today, or maybe even tomorrow, I'll file a bug report in Fedora's bugzilla.


Reply With Quote
Normally you can at least see the memory usage of the Xorg process, but having potentially-large memory allocation that's not owned by a process is a new one for most setups.
.
