All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Johannes Hirte <johannes.hirte@datenkhaos.de>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: throttle delayed refs better
Date: Wed, 5 Feb 2014 10:49:15 -0500	[thread overview]
Message-ID: <52F25D7B.90807@fb.com> (raw)
In-Reply-To: <20140205091428.076fa15c@datenkhaos.de>


On 02/05/2014 03:14 AM, Johannes Hirte wrote:
> On Tue, 4 Feb 2014 09:12:54 -0500
> Josef Bacik <jbacik@fb.com> wrote:
>
>> Hrm I was hoping that was going to be more helpful.  Can you get perf
>> record -ag and then perf report while it's at full cpu and get the
>> first 3 or 4 things with their traces?
> Here it comes:
>
> # ========
> # captured on: Wed Feb  5 00:11:41 2014
> # ========
> #
> no symbols found in /usr/sbin/acpid, maybe install a debug package?
> unexpected end of event stream
> # Samples: 168K of event 'cycles'
> # Event count (approx.): 126847081763
> #
> # Overhead          Command               Shared Object                                                                                           Symbol
> # ........  ...............  ..........................  ...............................................................................................
> #
>      18.48%  btrfs-freespace  [kernel.kallsyms]           [k] state_store
>              |
>              --- state_store
>
>      10.25%  btrfs-freespace  [kernel.kallsyms]           [k] sys_sched_rr_get_interval
>              |
>              --- sys_sched_rr_get_interval
>
>       9.02%  btrfs-freespace  [kernel.kallsyms]           [k] rt_mutex_slowunlock
>              |
>              --- rt_mutex_slowunlock
>
>       8.76%  btrfs-freespace  [kernel.kallsyms]           [k] btrfs_submit_compressed_write
>              |
>              --- btrfs_submit_compressed_write
>
>       6.63%  btrfs-freespace  [kernel.kallsyms]           [k] sched_show_task
>              |
>              --- sched_show_task
>
>       5.19%  btrfs-freespace  [kernel.kallsyms]           [k] find_free_extent
>              |
>              --- find_free_extent
>
>       5.15%  btrfs-freespace  [kernel.kallsyms]           [k] trace_print_graph_duration
>              |
>              --- trace_print_graph_duration
>
>> I'm going to try and
>> reproduce today, is there anything special about your fs?
>> Compression, large blocksizes, skinny metadata?  Thanks,
> Filesystem was created with -l 32768 -n 32768 and skinny metadata enabled.
>
Ok none of those make sense which makes me think it may be the ktime 
bits, instead of un-applying the whole patch could you just comment out 
the parts

         ktime_t start = ktime_get();

and

         if (actual_count > 0) {
                 u64 runtime = ktime_to_ns(ktime_sub(ktime_get(), start));
                 u64 avg;

                 /*
                  * We weigh the current average higher than our current 
runtime
                  * to avoid large swings in the average.
                  */
                 spin_lock(&delayed_refs->lock);
                 avg = fs_info->avg_delayed_ref_runtime * 3 + runtime;
                 avg = div64_u64(avg, 4);
                 fs_info->avg_delayed_ref_runtime = avg;
                 spin_unlock(&delayed_refs->lock);
         }

in __btrfs_run_delayed_refs and see if that makes the problem stop? If 
it does will you try chris's for-linus branch to see if it still 
reproduces there?  Maybe some patch changed ktime_get() in -rc1 that is 
causing issues and we're just now exposing it.  Thanks,

Josef

  reply	other threads:[~2014-02-05 15:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 18:07 [PATCH] Btrfs: throttle delayed refs better Josef Bacik
2014-01-24  7:34 ` Liu Bo
2014-01-24 14:53   ` Josef Bacik
2014-02-03 18:28 ` Johannes Hirte
2014-02-03 21:08   ` Josef Bacik
2014-02-03 22:53     ` Johannes Hirte
2014-02-04 14:12       ` Josef Bacik
2014-02-05  8:14         ` Johannes Hirte
2014-02-05 15:49           ` Josef Bacik [this message]
2014-02-05 17:34             ` Johannes Hirte
2014-02-05 19:00               ` Josef Bacik
2014-02-05 19:30                 ` Johannes Hirte
2014-02-05 19:36                   ` Josef Bacik
2014-02-05 21:42                     ` Johannes Hirte
2014-02-05 21:46                       ` Josef Bacik
2014-02-05 22:57                         ` Johannes Hirte
2014-02-06 15:14                           ` Josef Bacik
2014-02-06 21:19                           ` Josef Bacik
2014-02-14 19:25                             ` Johannes Hirte
2014-02-14 19:29                               ` Josef Bacik
2014-02-15 17:42                                 ` Johannes Hirte
2014-02-05 22:22                       ` Josef Bacik
2014-02-27 15:38 ` 钱凯
2014-02-27 15:56   ` Josef Bacik
2015-10-14 15:46     ` Alex Lyakas

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=52F25D7B.90807@fb.com \
    --to=jbacik@fb.com \
    --cc=johannes.hirte@datenkhaos.de \
    --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.