mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Brian Ristuccia <bristuccia@starentnetworks.com>
Cc: Andreas Dilger <adilger@turbolinux.com>,
	linux-kernel@vger.kernel.org, djohnson@starentnetworks.com
Subject: Re: repeated failed open()'s results in lots of used memory [Was: [Fwd: memory consumption]]
Date: Wed, 1 Aug 2001 16:53:59 -0600 (MDT)	[thread overview]
Message-ID: <200108012253.f71MrxGO007546@webber.adilger.int> (raw)
In-Reply-To: <3B688480.7090704@starentnetworks.com> "from Brian Ristuccia at Aug 1, 2001 06:36:48 pm"

Brian Ristuccia writes:
> Andreas Dilger wrote:
> > You are probably creating negative dentries.  Check /proc/slabinfo for
> > the number of dentries, and it will confirm this.  I'm not sure why
> > that would cause swapping, but then again I haven't checked the policy
> > for shrinking the dentry cache recently, and there have been a number
> > of changes in that area lately.
> 
> Yow! Right on. On 2.2.19 and 2.4.7, the  line for dentry_cache in 
> /proc/slabinfo skyrockets while the test program is running. Also, on 
> 2.2.19 but not 2.4.7 the line for size-32 climbs steadily at around the 
> same pace as dentry_cache when the test program is running. After I stop 
> the test program, the number slowly declines as other processes allocate 
> memory.

So it is identified, but still probably needs to be fixed in some way.
Otherwise, you could potentially have DOS from someone trying to read
or create files, even if they don't have write permission _anywhere_
on the system.

Looking at the code, it appears that if we call shrink_dcache_memory()
from while trying to allocate memoty for a filesystem, it returns
without doing anything, to avoid a deadlock.  Al Viro and/or Marcelo
Tosatti probably know how to fix this.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


  reply	other threads:[~2001-08-01 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-01 20:58 Brian Ristuccia
2001-08-01 22:04 ` Andreas Dilger
2001-08-01 22:36   ` Brian Ristuccia
2001-08-01 22:53     ` Andreas Dilger [this message]
2001-08-01 23:57     ` Linus Torvalds
2001-08-01 22:54 ` Linus Torvalds
2001-08-01 23:08   ` Alexander Viro
2001-08-01 23:14     ` Linus Torvalds
2001-08-02  1:23       ` Alexander Viro
2001-08-02  4:42         ` Rik van Riel

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=200108012253.f71MrxGO007546@webber.adilger.int \
    --to=adilger@turbolinux.com \
    --cc=bristuccia@starentnetworks.com \
    --cc=djohnson@starentnetworks.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®