All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yan Li <elliot.li.tech@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Yan Li <elliot.li.tech@gmail.com>
Subject: autodefrag causing freezes under heavy writes?
Date: Mon, 5 Jul 2021 20:56:23 -0700	[thread overview]
Message-ID: <CALc-jWwheBvcKKM79AD7BA5ZZQs7D407acgwOiwyo9R=U98Nwg@mail.gmail.com> (raw)

Hi!

I'm using 5.11.0-22-generic from Ubuntu 21.04. My btrfs is running in
raid1 mode with two SATA SSDs. Mount options
"defaults,ssd,noatime,compress=zstd". Motherboard is ASUS Pro WS
X570-ACE with 32GB ECC RAM and AMD Ryzen 5 5600X. The system has no
other known problems.

I found that when I added the autodefrag mount option, the system
would freeze under heavy write workload for a long time before the
write finished and the system recovered itself, and would occasionally
freeze with a simple sync. During heavy write workloads, dmesg showed:

INFO: task journal-offline:514885 blocked for more than 120 seconds.
      Tainted: P           OE     5.11.0-22-generic #23-Ubuntu
task:journal-offline state:D stack:    0 pid:514885 ppid:     1 flags:0x00000220
Call Trace:
 __schedule+0x23d/0x670
 schedule+0x4f/0xc0
 btrfs_start_ordered_extent+0xdd/0x110 [btrfs]
 ? wait_woken+0x80/0x80
 btrfs_wait_ordered_range+0x120/0x210 [btrfs]
 btrfs_sync_file+0x2d1/0x480 [btrfs]
 vfs_fsync_range+0x49/0x80
 ? __fget_light+0x32/0x80
 __x64_sys_fsync+0x39/0x60
 do_syscall_64+0x38/0x90
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f49c9178d4b
RSP: 002b:00007f49c5150c50 EFLAGS: 00000293 ORIG_RAX: 000000000000004a
RAX: ffffffffffffffda RBX: 00005589e7e26140 RCX: 00007f49c9178d4b
RDX: 0000000000000002 RSI: 00007f49c94bf497 RDI: 000000000000002c
RBP: 00007f49c94c1db0 R08: 0000000000000000 R09: 00007f49c5151640
R10: 0000000000000017 R11: 0000000000000293 R12: 0000000000000002
R13: 00007ffee4c5c8bf R14: 0000000000000000 R15: 00007f49c5151640

And many similar messages. The heavy write workload was just a dd from
urandom to a file.

The system behaves fine when I remove the autodefrag mount option.

Is this a known problem? If you need any more information, please
kindly let me know.

Thanks!

-- 
Yan

             reply	other threads:[~2021-07-06  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  3:56 Yan Li [this message]
2021-07-07 19:00 ` autodefrag causing freezes under heavy writes? David Sterba
2021-07-09 19:10   ` Yan Li
     [not found] ` <20210706161908.BE32.409509F4@e16-tech.com>
2021-07-09 19:01   ` Yan Li

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='CALc-jWwheBvcKKM79AD7BA5ZZQs7D407acgwOiwyo9R=U98Nwg@mail.gmail.com' \
    --to=elliot.li.tech@gmail.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.