Lionel Elie Mamane wrote:

> I'm not sure if the bug is in top or in linux. top reports that galeon
> (my web browser) uses 195GB of swap; that's far more swap than I have,
> so not possible.

Probably due to memory-mapped files.  Compare [1].

Starting with version 3.3.0, procps uses the VmSwap field from Linux,
which should avoid such confusing behavior.  Unfortunately the Linux
kernel in squeeze does not provide that field, so you might find that
everything is reported to use zero swap.

The Linux support was added in v2.6.34-rc1~182 ("mm: count swap usage"):

    A frequent questions from users about memory management is what numbers of
    swap ents are user for processes.  And this information will give some
    hints to oom-killer.

    Besides we can count the number of swapents per a process by scanning
    /proc/<pid>/smaps, this is very slow and not good for usual process
    information handler which works like 'ps' or 'top'.  (ps or top is now
    enough slow..)

    This patch adds a counter of swapents to mm_counter and update is at each
    swap events.  Information is exported via /proc/<pid>/status file

A fallback that looks at /proc/<pid>/smaps might be possible.

Hope that helps,
Jonathan

[1] http://bugs.debian.org/650163



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to