From: Miao Xie <miaox@cn.fujitsu.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>,
David Sterba <dave@jikos.cz>, Ito <t-itoh@jp.fujitsu.com>,
Itaru Kitayama <kitayama@cl.bb4u.ne.jp>
Subject: Re: [PATCH V4] btrfs: implement delayed inode items operation
Date: Wed, 23 Mar 2011 09:57:56 +0800 [thread overview]
Message-ID: <4D8953A4.4040008@cn.fujitsu.com> (raw)
In-Reply-To: <1300709085-sup-9849@think>
On Mon, 21 Mar 2011 08:08:17 -0400, Chris Mason wrote:
>>> I also think that code is racing with the code that frees delayed nodes,
>>> but haven't yet triggered my debugging printks to prove either one.
>>
>> We free delayed nodes when we want to destroy the inode, at that time, just one task,
>> which is destroying inode, can access the delayed nodes, so I think ACCESS_ONCE() is
>> enough. What do you think about?
>
> Great, I see what you mean. The bigger problem right now is that we may do
> a lot of operations in destroy_inode(), which can block the slab
> shrinkers on our metadata operations. That same stress.sh -n 50 run is
> running into OOM.
>
> So we need to rework the part where the final free is done. We could
> keep a ref on the inode until the delayed items are complete, or we
> could let the inode go and make a way to lookup the delayed node when
> the inode is read.
I find the slab shrinkers just reclaim inodes which are in the inode_unused
list, so if we free delayed nodes before moving the inode into the inode_unused
list, we can avoid blocking the slab shrinker. Thus maybe we can fix the above
problem by moving btrfs_remove_delayed_node() from btrfs_destroy_inode()
to btrfs_drop_inode(). How do you think about?
Thanks
Miao
>
> I'll read more today.
>
> -chris
>
next prev parent reply other threads:[~2011-03-23 1:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 9:24 [PATCH V4] btrfs: implement delayed inode items operation Miao Xie
2011-03-21 0:33 ` Chris Mason
2011-03-21 5:05 ` Miao Xie
2011-03-21 12:08 ` Chris Mason
2011-03-23 1:57 ` Miao Xie [this message]
2011-03-23 14:20 ` Miao Xie
2011-03-22 2:33 ` Itaru Kitayama
2011-03-22 3:12 ` Miao Xie
2011-03-22 3:50 ` Itaru Kitayama
2011-03-22 10:03 ` Miao Xie
2011-03-22 13:33 ` Itaru Kitayama
2011-03-23 1:27 ` Miao Xie
2011-03-23 3:24 ` Itaru Kitayama
2011-03-23 4:00 ` Miao Xie
2011-03-23 4:19 ` Itaru Kitayama
2011-03-23 9:47 ` Miao Xie
2011-03-24 3:38 ` Itaru Kitayama
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=4D8953A4.4040008@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=chris.mason@oracle.com \
--cc=dave@jikos.cz \
--cc=kitayama@cl.bb4u.ne.jp \
--cc=linux-btrfs@vger.kernel.org \
--cc=t-itoh@jp.fujitsu.com \
/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.