public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan Schumaker <bjschuma@netapp.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Memory leak via nfs_readdir_make_qstr
Date: Wed, 10 Nov 2010 15:19:23 -0500	[thread overview]
Message-ID: <4CDAFE4B.1060408@netapp.com> (raw)
In-Reply-To: <1289412737.4513.80.camel@e102109-lin.cambridge.arm.com>

On 11/10/2010 01:12 PM, Catalin Marinas wrote:
> Hi,
> 
> I tested the 2.6.37-rc1 on an ARM platform with nfsroot filesystem.
> Kmemleak reports quite a lot (> 150) of leaks like below. You seem to
> have made changes recently to this area.
> 
<snip>
> 
> Any quick thoughts? I'll have a look tomorrow as well.

Hi

My first thought is that this is because of how we are caching the result of a readdir now.  We are storing the name of each directory entry as part of the cache, and this requires allocating memory for each string.  These are freed on unmount (see nfs_readdir_clear_array() in fs/nfs/dir.c), but you probably don't want to unmount your root filesytem...

- Bryan

> 
> Thanks,
> 
> Catalin
> 


  reply	other threads:[~2010-11-10 20:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 18:12 Memory leak via nfs_readdir_make_qstr Catalin Marinas
2010-11-10 20:19 ` Bryan Schumaker [this message]
2010-11-10 21:24   ` Catalin Marinas
2010-11-11 11:01     ` Catalin Marinas

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=4CDAFE4B.1060408@netapp.com \
    --to=bjschuma@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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