xfs: introduce per-cpu CIL tracking structure
authorDave Chinner <dchinner@redhat.com>
Fri, 1 Jul 2022 16:13:52 +0000 (02:13 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 1 Jul 2022 16:13:52 +0000 (02:13 +1000)
commitaf1c2146a50b1ffe7e10cae1f7e64ab56b7f8c1f
tree4e5fb2724a8e0a4aa61394670feab0d9e48ecb60
parent31151cc342dd9cc2c5a5954f3e7b2dcf2fb50f64
xfs: introduce per-cpu CIL tracking structure

The CIL push lock is highly contended on larger machines, becoming a
hard bottleneck that about 700,000 transaction commits/s on >16p
machines. To address this, start moving the CIL tracking
infrastructure to utilise per-CPU structures.

We need to track the space used, the amount of log reservation space
reserved to write the CIL, the log items in the CIL and the busy
extents that need to be completed by the CIL commit.  This requires
a couple of per-cpu counters, an unordered per-cpu list and a
globally ordered per-cpu list.

Create a per-cpu structure to hold these and all the management
interfaces needed, as well as the hooks to handle hotplug CPUs.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_super.c