When going through the screensavers from xscreensaver, my memory consumption goes up until it reduces my machine to a swapping mess that takes minutes to respond to any user interaction. Reproducible: Always Steps to Reproduce: 1. open xscreensaver 2. click on an OpenGL-based screensaver (and wait 'til the preview appears to the right) 3. click on another screensaver 4. repeat 2. and 3. Actual Results: memory consumption goes up every time the preview for an OpenGL-based screensaver comes up and doesn't go down anymore - not even if I exit xscreensaver or stop the X server (!) Expected Results: memory should be freed when it's not used anymore ;) I'm on a 1.4rc2 system. I tried with: - gentoo-2.4.19-r10 kernel and nvidia-kernel-1.0.3123-r2/nvidia-glx-1.0.3123 - vanilla 2.4.20 kernel and nvidia as above - vanilla 2.4.20 kernel and nvidia-kernel-1.0.2960-r1/nvidia-glx-2.0.2960-r1 all of these showed the described behaviour - vanilla 2.4.20 kernel and nvidia-kernel-1.0.2880-r1/nvidia-glx-1.0.2880 this one seems to work without a problem on my previous gentoo system (1.2), I also had problems when I recently upgraded the nvidia drivers - I didn't investigate however, since I knew I'd be re-installing soon anyway. But from what I can remember, that could well have been the same problem (I *think* I was upgrading from 1.0.2880 back then) I have an Athlon system with VIA 82C686 chipset and a Riva TNT (don't laugh) card.
Fixed? I emailed Nvidia about this bug and the nvidia memory leak problems mentioned in our fora. I am able to replicate this bug on my machine using gentoo-sources-2.4.20-r1 with the 4191 and 3123 Nvidia drivers. Andy (from Nvidia) sent me the following patch. It solved the problem for me using the 4191 Nvidia driver. I have not tried it with the 3123 Nvidia driver yet. He also pointed out that the orignal bug report said it was reproducible on vanilla-2.4.20 sources which don't have the code that gets patched below so there may be other problems too. BTW: this all happened today (Saturday). Many thanks to Andy for working during the weekend. I'm on a Dell i8200 laptop with a GeForce2 Go card w/ 32 Meg Vram and using Nvidia AGP. diff -ru linux-2.4.20-2.48/mm/page_alloc.c linux-2.4.20-6/mm/page_alloc.c --- linux-2.4.20-2.48/mm/page_alloc.c 2003-02-13 08:31:30.000000000 -0800 +++ linux-2.4.20-6/mm/page_alloc.c 2003-02-27 06:33:37.000000000 -0800 @@ -98,13 +106,13 @@ lru_cache_del(page); } - /* - * This late check is safe because reserved pages do not - * have a valid page->count. This trick avoids overhead - * in __free_pages(). - */ - if (PageReserved(page)) - return; + + + + + + + if (page->buffers) BUG(); if (page->mapping) { @@ -654,7 +662,7 @@ void __free_pages(struct page *page, unsigned int order) { - if (put_page_testzero(page)) + if (!PageReserved(page) && put_page_testzero(page)) __free_pages_ok(page, order); }
lolo/whoever, please have a look.
*** Bug 17955 has been marked as a duplicate of this bug. ***
i'll have to see how the patch affects people who are *not* using nvidia's proprietary drivers. Jay
This problem has vanished on my system using the 4349 drivers with the Gentoo 2.4.20-r2 Kernel.
Ok, great.