I've broken this up into two patches because the bugfix is easy (patch
1) and I don't want to rework it for the purpose of refactoring usage of
the queue. Patch 1 is a straightforward, tested and backportable fix for
a specific problem and it's no more difficult to refactor queue usage
from a per-mount queue than from a single global queue.
The metadata/log buffer I/O separation is not as straightforward as
defining separate queues. We need to also define a mechanism to split
the completions across multiple queues within the buffer code. The ioend
code does this for the data/unwritten queues via the io type. There are
a few different ways we can go from here with regard to buffers. For
- Define per-buftarg workqueues and configure them appropriately for
data and log devices.
- Split buf completion processing based on a buffer flag (or some other
- Continue using a single queue (per-mount) for metadata/log
The first approach introduces variance in that the separation only
occurs with separate data and log devices. This is not ideal and doesn't
seem worthwhile to me. It doesn't change anything in the common case and
introduces a new regression vector for the uncommon case.
The second approach is implemented by the 2/2 RFC of this series using
the XBF_SYNCIO flag simply because it only appears to be used by log
buffers at the moment. If we take this approach, should we define
something like an XBF_LOGIO or XBF_HIGHPRI flag?
The third approach simply involves dropping patch 2/2 and using the
per-mount queue as we use the global queue today.
- Split bug fix and buf/log I/O split into separate patches.
- Rename xfslogd workqueue to xfs-buf.
- Rename xfslogd workqueue to xfs-iodone.
Brian Foster (2):
xfs: replace global xfslogd wq with per-mount wq
xfs: split metadata and log buffer completion to separate workqueues
fs/xfs/xfs_buf.c | 19 ++++++++-----------
fs/xfs/xfs_mount.h | 1 +
fs/xfs/xfs_super.c | 12 ++++++++++--
3 files changed, 19 insertions(+), 13 deletions(-)