linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] possible badness in prune_dcache()
@ 2008-04-04 11:40 Alex Lyashkov
  2008-04-04 12:42 ` Miklos Szeredi
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Lyashkov @ 2008-04-04 11:40 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Andrew Perepechko

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-04-07 10:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 11:40 [RFC] possible badness in prune_dcache() Alex Lyashkov
2008-04-04 12:42 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).