Re: quicklists confuse meminfo




* Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

Bart reported http://bugzilla.kernel.org/show_bug.cgi?id=9991. He
assumed a memory leak in 32bit kernels when he analyzed the output of
/proc/meminfo.

The leak is not a leak, it's an accounting bug. quicklists keep a
large amount of pages which are accounted as used memory.
[...]
Another strange observation about quicklists is the imbalance of the
quicklists across CPUs. Running the above loop on a 2way machine I can
observe that the quicklist pages are acuumulating on one CPU. Stopping
and restarting the loop a couple of times can shift the accumulation
from one to the other CPU.

hm. I think we should not let this much RAM hang around in a
special-purpose allocator like quicklists. Shouldnt the quicklists be
temporary in nature, and be trimmed much more agressively?

in fact, we have a check_pgt_cache() call in cpu_idle(), which does:

quicklist_trim(0, pgd_dtor, 25, 16);

but it appears we dont do quicklist trimming anywhere else! So if a
system has no idle time, the quicklist can grow unbounded, and that's a
real memory leak IMO.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: quicklists confuse meminfo
    ... quicklists across CPUs. ... observe that the quicklist pages are acuumulating on one CPU. ... system has no idle time, the quicklist can grow unbounded, and that's a ... real memory leak IMO. ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 1/2] Show quicklist at meminfo
    ... Quicklist doesn't concern to cpu hotplug at all. ... At present the quicklists store some page for each CPU as a cache. ... How much quicklist spent memory at maximum case? ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 0/2] Quicklist is slighly problematic.
    ... if you have a bit time, Could you please read this mail and patches? ... Quicklist store some page in each CPU as cache. ... => Amount of quicklists shouldn't be proposional to #ofCPUs. ...
    (Linux-Kernel)
  • [RFC][PATCH 0/2] Quicklist is slighly problematic.
    ... Quicklist store some page in each CPU as cache. ... How much quicklist spent memory at maximum case? ... => Amount of quicklists shouldn't be proposional to #ofCPUs. ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 1/2] Show quicklist at meminfo
    ... Quicklist doesn't concern to cpu hotplug at all. ... At present the quicklists store some page for each CPU as a cache. ... How much quicklist spent memory at maximum case? ...
    (Linux-Kernel)