I have been seeing a kernel memory leak (or what looks a hell of a lot
like one) on recently openwrt (as of 6+ months ago).  It seems to be
triggered running a particular shell script, though I'm having trouble
narrowing it down because of its heisenbug properties, and also
because it's fairly slow and you can only really see it over intervals
of several hours.

One of the things I am having trouble with is figuring out where the
memory is going with /proc/meminfo.  It is not clear what components
should be added to get the MemTotal.  My attempts so far aren't adding
up (that is, I get something a non-zero remainder).  E.g.:

  awk '$1 ~ /MemTotal/ { sum += $2 ; print $0 } 
       $1 ~ 
/MemFree|Buffers|Cached|AnonPages|Slab|Mapped|Shmem|KernelStack|PageTables/ { 
sum -= $2 ; print $0 } 
       END { print sum }'

I've asked on the linux-mm irc channel, with deafening crickets as
response.  Google has been unhelpful on memory accounting, mostly just
pointing me at newbie questions/answers about "where did all my memory
go?!" (when it is just eaten by recoverable cache and buffers) which
is not my problem.  Also, kmemleak is not helping.

Does anyone have practical advice on kernel memory accounting? 

TIA.


-- 
Russell Senior, President
[email protected]
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to