diff options
author | Brian Foster <bfoster@redhat.com> | 2021-04-09 20:27:43 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-09 20:32:13 +0300 |
commit | 7cd3099f4925d7c15887d1940ebd65acd66100f5 (patch) | |
tree | a96b525a4daa9773c38c1d9a76591d2dea40a3c3 /sound | |
parent | 3b6dd9a9aeeada19d0c820ff68e979243a888bb6 (diff) | |
download | linux-7cd3099f4925d7c15887d1940ebd65acd66100f5.tar.xz |
xfs: drop submit side trans alloc for append ioends
Per-inode ioend completion batching has a log reservation deadlock
vector between preallocated append transactions and transactions
that are acquired at completion time for other purposes (i.e.,
unwritten extent conversion or COW fork remaps). For example, if the
ioend completion workqueue task executes on a batch of ioends that
are sorted such that an append ioend sits at the tail, it's possible
for the outstanding append transaction reservation to block
allocation of transactions required to process preceding ioends in
the list.
Append ioend completion is historically the common path for on-disk
inode size updates. While file extending writes may have completed
sometime earlier, the on-disk inode size is only updated after
successful writeback completion. These transactions are preallocated
serially from writeback context to mitigate concurrency and
associated log reservation pressure across completions processed by
multi-threaded workqueue tasks.
However, now that delalloc blocks unconditionally map to unwritten
extents at physical block allocation time, size updates via append
ioends are relatively rare. This means that inode size updates most
commonly occur as part of the preexisting completion time
transaction to convert unwritten extents. As a result, there is no
longer a strong need to preallocate size update transactions.
Remove the preallocation of inode size update transactions to avoid
the ioend completion processing log reservation deadlock. Instead,
continue to send all potential size extending ioends to workqueue
context for completion and allocate the transaction from that
context. This ensures that no outstanding log reservation is owned
by the ioend completion worker task when it begins to process
ioends.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions