All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: balance delayed inode updates
Date: Thu, 6 Feb 2014 16:28:45 -0500	[thread overview]
Message-ID: <52F3FE8D.8040706@fb.com> (raw)
In-Reply-To: <1391720873-4961-1-git-send-email-jbacik@fb.com>



On 02/06/2014 04:07 PM, Josef Bacik wrote:
> While trying to reproduce a delayed ref problem I noticed the box kept falling
> over using all 80gb of my ram with btrfs_inode's and btrfs_delayed_node's.
> Turns out this is because we only throttle delayed inode updates in
> btrfs_dirty_inode, which doesn't actually get called that often, especially when
> all you are doing is creating a bunch of files.  So balance delayed inode
> updates everytime we create a new inode.  With this patch we no longer use up
> all of our ram with delayed inode updates.  Thanks,
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
>   fs/btrfs/extent-tree.c | 1 +
>   fs/btrfs/inode.c       | 4 ++++
>   2 files changed, 5 insertions(+)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 9c9ecc9..1d9d9ce 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -2660,6 +2660,7 @@ int btrfs_should_throttle_delayed_refs(struct btrfs_trans_handle *trans,
>   		atomic_read(&trans->transaction->delayed_refs.num_entries);
>   	u64 avg_runtime;
>
> +	return 1;
>   	smp_mb();

Do git add for the file I want, do git commit -a anyway.

Josef

      reply	other threads:[~2014-02-06 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06 21:07 [PATCH] Btrfs: balance delayed inode updates Josef Bacik
2014-02-06 21:28 ` Josef Bacik [this message]

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=52F3FE8D.8040706@fb.com \
    --to=jbacik@fb.com \
    --cc=linux-btrfs@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.