Netdev List
 help / color / mirror / Atom feed
From: Kumar S <ps2kumar@yahoo.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: Memory leak in ip_dst_cache
Date: Sun, 11 Sep 2011 20:38:30 -0700 (PDT)	[thread overview]
Message-ID: <1315798710.96027.YahooMailNeo@web113913.mail.gq1.yahoo.com> (raw)
In-Reply-To: <20110910130416.GA2005@neilslaptop.think-freely.org>

Thanks Neil. I did try with prink(). I do see entries getting aged out, but they are not getting deallocated. This seems to be happening because of "ref_cnt". When the route entries are added the ref_cnt is set to 1. Looks this is causing trouble clearing the entries completely. If I set the ref_cnt to 0, I can see it working. Now I'm trying to understand whether this is right. Please let me know if you have any thoughts on it.


----- Original Message -----
From: Neil Horman <nhorman@tuxdriver.com>
To: Kumar S <ps2kumar@yahoo.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>; netdev <netdev@vger.kernel.org>
Sent: Saturday, September 10, 2011 6:04 AM
Subject: Re: Memory leak in ip_dst_cache

On Fri, Sep 09, 2011 at 03:53:45PM -0700, Kumar S wrote:
> Yes Eric, this command doesn't work on 2.6.24. Which timer are you suspecting?
> 
He means that the timer that starts the the workqueue which calls dst_gc_task is
either delayed indefinately, or otherwise not run, which means that the route
cache will never be scanned for old entries.  The implication being that, while
the dst entries aren't leaked per-se, but never expired, so they just sit
around.  You can check this by instrumenting gc_dst_task with a printk or two
and watch to see if it ever pops up.

If you only have 512Mb of ram and want to really restrict you're cache size, you
should definately consider backporting the route cache rebuild patch to disable
the route cache usage entirely.  It shouldn't be too hard to do.
Neil

> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-09-12  3:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  5:04 Memory leak in ip_dst_cache Kumar S
2011-09-09  5:30 ` Eric Dumazet
     [not found]   ` <1315593553.98279.YahooMailNeo@web113904.mail.gq1.yahoo.com>
     [not found]     ` <1315596786.2606.3.camel@edumazet-laptop>
2011-09-09 20:48       ` Kumar S
2011-09-09 21:47         ` Eric Dumazet
     [not found]           ` <1315605497.25052.YahooMailNeo@web113916.mail.gq1.yahoo.com>
2011-09-09 22:08             ` Eric Dumazet
2011-09-09 22:53               ` Kumar S
2011-09-10 13:04                 ` Neil Horman
2011-09-12  3:38                   ` Kumar S [this message]
2011-09-12  5:40                     ` Eric Dumazet
2011-09-12  6:07                       ` Kumar S
2011-09-12  6:28                         ` Eric Dumazet
2011-09-12 17:16                           ` Kumar S
2011-09-12 17:57                             ` Eric Dumazet
2011-09-12 22:20                               ` Kumar S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315798710.96027.YahooMailNeo@web113913.mail.gq1.yahoo.com \
    --to=ps2kumar@yahoo.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox