From: Andrew Morton <akpm@osdl.org>
To: Steve Lord <lord@xfs.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: negative dentry_stat.nr_unused causes aggressive dcache pruning
Date: Thu, 9 Dec 2004 13:19:49 -0800 [thread overview]
Message-ID: <20041209131949.7862f0c8.akpm@osdl.org> (raw)
In-Reply-To: <41B8BB96.4040006@xfs.org>
Steve Lord <lord@xfs.org> wrote:
>
> Andrew Morton wrote:
> > Steve Lord <lord@xfs.org> wrote:
> >
> >>I have seen this stat go negative (just from booting up a multi cpu box),
> >> and looking at the code, it is manipulated without locking in a number
> >> of places. I have only seen this in real life on a 2.4 kernel, but 2.6
> >> also looks vulnerable.
> >
> >
> > In 2.6, both dentry_stat.nr_unused and dentry_stat.nr_dentry are covered
> > by dcache_lock. I just double-checked and all seems well.
> >
>
> I still do not know exactly how the count gets negative, but I tracked it
> down to a user space app from emulex called HBAanywhere. The only thing I
> can see this doing which might be related is attempting to open a lot of
> non-existant /proc entries:
>
> /proc/scsi//120
> /proc/scsi//121
> etc...
>
> Yes there is a // in there.
>
> I ran with a BUG call if we manipulate nr_unused without the dcache lock
> and it never tripped. All very wierd.
>
Is that 2.4 or 2.6?
I'd be expecting a systematic counting bug. After all, nr_unused would
normally be in the thousands and it'd take a lot of races to get that down
to zero.
next prev parent reply other threads:[~2004-12-09 21:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 22:16 negative dentry_stat.nr_unused causes aggressive dcache pruning Steve Lord
2004-12-08 23:01 ` Greg Banks
2004-12-09 10:09 ` Andrew Morton
2004-12-09 16:33 ` Steve Lord
2004-12-09 20:54 ` Steve Lord
2004-12-09 21:19 ` Andrew Morton [this message]
2004-12-09 21:51 ` Steve Lord
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=20041209131949.7862f0c8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lord@xfs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.