linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: trim latency improvements
@ 2018-09-06 21:18 jeffm
  2018-09-06 21:18 ` [PATCH 1/3] btrfs: use ->devices list instead of ->alloc_list in btrfs_trim_fs jeffm
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: jeffm @ 2018-09-06 21:18 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Jeff Mahoney

From: Jeff Mahoney <jeffm@suse.com>

This patch set fixes a few issues with trim.

1) Fix device list iteration.  We're iterating the ->alloc_list while
   holding the device_list_mutex.  The ->alloc_list is protected by
   the chunk mutex and we don't want to hold it across the entire
   trim execution.  Instead, use the ->devices list, which is protected
   by the device_list_mutex.

2) Skip trim on devices that don't support it.  Rather than letting
   the block layer reject it, bounce out early.

3) Don't keep the commit_root_sem locked and the transaction pinned
   across the block layer component of trim.  We only need these to
   ensure the pending chunks list doesn't go away underneath us, so
   it's safe to drop across the trim itself.  Historically, this
   caused issues when fstrim and balance would run at the same time
   since balance would produce lots of transactions and would
   have to wait constantly, causing problems for everything else that
   wanted to start a transaction.

-Jeff
---

Jeff Mahoney (3):
  btrfs: use ->devices list instead of ->alloc_list in btrfs_trim_fs
  btrfs: don't attempt to trim devices that don't support it
  btrfs: keep trim from interfering with transaction commits

 fs/btrfs/extent-tree.c | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

-- 
2.12.3

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

end of thread, other threads:[~2018-09-14 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06 21:18 [PATCH 0/3] btrfs: trim latency improvements jeffm
2018-09-06 21:18 ` [PATCH 1/3] btrfs: use ->devices list instead of ->alloc_list in btrfs_trim_fs jeffm
2018-09-14 16:22   ` David Sterba
2018-09-06 21:18 ` [PATCH 2/3] btrfs: don't attempt to trim devices that don't support it jeffm
2018-09-14 16:27   ` David Sterba
2018-09-06 21:18 ` [PATCH 3/3] btrfs: keep trim from interfering with transaction commits jeffm
2018-09-14 16:28   ` David Sterba
2018-09-14 16:33 ` [PATCH 0/3] btrfs: trim latency improvements David Sterba

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).