All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Lyashkov <Alexey.Lyashkov@Sun.COM>
To: linux-fsdevel@vger.kernel.org
Cc: Andrew Perepechko <Andrew.Perepechko@Sun.COM>
Subject: [RFC] possible badness in prune_dcache()
Date: Fri, 04 Apr 2008 14:40:00 +0300	[thread overview]
Message-ID: <1207309200.12346.25.camel@bear.shadowland> (raw)

Hello list,

When investigation livelock in RHEL3, i found possible badness in
prune_dcache, which exist in 2.6.24 also.

situation - system has ~6 mounted filesystem, at 5 FS do some io, and
one FS start umount.
shrink_dcache_parent - collect unused dentries after call
select_parent() and put these dentries into end of LRU for kill.
but between exit from select_parent() and enter to prune_dcache(,sb)
some processed add more unused dentries and put to end lru also.
prune_dcache start skip some dentiries in loop 
>>>>
                        while (skip && tmp != &dentry_unused &&
                            list_entry(tmp, struct dentry,
d_lru)->d_sb != sb) {
                                skip--;
                                tmp = tmp->prev;
                        }

>>>
but not found correct dentry for superblock.
later condition 
                 if (tmp == &dentry_unused)
                        break;
not hit - because LRU has additional dentry, and prune_dcache(,sb) kill
dentry not related to submitted superblock.
(this first stranges - for me)

but this not all, because count != 0 prune_dcache run in loop and kill
all dentries not related to submited sb, with can be need many time (in
my situation ~15min for ~200k dentries).

after exit from prune_dcache - shrink_dcache_parent() do loop and try
again destroy dentries - which also need some time.

my tests - show changing condition, from
                 if (tmp == &dentry_unused)
                        break;
to
                 if (tmp == &dentry_unused) || (sb && (list_entry(tmp,
struct dentry, d_lru)->d_sb != sb))
                        break;
help with live lock - because prune_dcache exit from loop early and move
required dentries to end of LRU - for easy kill.

Please comment this investigation.

PS. please send copy to me, i not subscribed to list.


-- 
Alex Lyashkov <Alexey.lyashkov@sun.com>
Lustre Group, Sun Microsystems


             reply	other threads:[~2008-04-04 11:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 11:40 Alex Lyashkov [this message]
2008-04-04 12:42 ` [RFC] possible badness in prune_dcache() Miklos Szeredi
2008-04-04 15:28   ` Alex Lyashkov
2008-04-04 15:29     ` Josef Bacik
2008-04-04 15:57       ` Josef Bacik
2008-04-04 18:38         ` Miklos Szeredi
2008-04-04 18:44           ` Josef Bacik
2008-04-04 18:49             ` Josef Bacik
2008-04-04 19:01             ` Miklos Szeredi
2008-04-04 19:13               ` Josef Bacik
2008-04-04 19:32                 ` Miklos Szeredi
2008-04-07  6:40                 ` Takashi Nishiie
2008-04-07 10:49     ` David Howells

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=1207309200.12346.25.camel@bear.shadowland \
    --to=alexey.lyashkov@sun.com \
    --cc=Andrew.Perepechko@Sun.COM \
    --cc=linux-fsdevel@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 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.