XFS Committed Item List
The XFS Committed Item List tracks in-memory logged changes awaiting a journal checkpoint.
CIL membership does not certify durable storage. [1] Linux v6.16 inserts items into per-CPU lists and aggregates them during a push. [2]
Relogging an object several times before the log buffers are written leaves one useful copy and several stale ones, which can exceed 90% of log-buffer space under repeated operations. Delayed logging keeps formatted changes in memory so only the latest copy is written, aiming to cut logged metadata by at least an order of magnitude without changing the on-disk format. [1]
On a log force the whole list is written as one atomic checkpoint, limited to slightly under half the log so that a complete transaction always remains for finding the head and tail. Items move into a per-checkpoint context so new transactions can join a fresh list, and log space is reserved as items are added. Unwritten metadata is no longer bounded by 2 MB of log buffers, so many thousands of transactions can vanish in a crash unless fsync is used. [1]
The push starts at a soft limit, the smaller of one eighth of the log and 16 times the in-core log buffer window, and commits are throttled at twice that. [5] [2] With 256 KiB records and 8 buffers the window is 2 MiB, so a 64 MiB log has an 8 MiB soft limit and logs of 256 MiB or more cap at 32 MiB.
Relations
Advantages
- On 80 cores, overwriting a block in a private file scaled well, which a study attributed to delayed logging, while ext4 spent 17.2% and 9.4% of CPU time starting and stopping journal transactions. [4]
Limitations
- File creation, deletion, growth and shrinking still did not scale under journaling on 80 cores. [4]
- The blocking limit is a throttle applied after insertion, not a hard bound on the memory the list pins. [5]
Citations
- Linux v6.16: XFS Logging Design, asynchronous transactions, checkpoints and item lifecycle
- Linux v6.16: xfs_log_cil.c, per-CPU insertion, aggregation and asynchronous flush
- Min, Kashyap, Maass, Kang and Kim. Understanding Manycore Scalability of File Systems. USENIX ATC 2016, section 5.1.2.
- Linux v6.16 fs/xfs/xfs_log_priv.h and libxfs/xfs_log_format.h, CIL space-limit macros.
Further reading
Sources & caveats
- The design document and code are by the subsystem maintainers and the source headers attribute copyright to companies, so they are project sources, not independent measurements.
- The 90% and order-of-magnitude figures are design statements and goals, not reproduced results.
- The 2016 university study tested kernel 4.2-rc8 and describes delayed logging rather than the list itself, so it supports the scaling claim only in general.
- Arithmetic: 16 x 2 MiB = 32 MiB; the two bounds cross at a 256 MiB log; a 32 KiB record size would cap the soft limit at 4 MiB.
- Arithmetic on the document examples: 10,000 x 150 bytes plus 20,000 x 12 bytes = about 1.74 MB against its 1.75 MB; 512 bytes per 32 KB for an 8 MB checkpoint is 128 KB against its around 150 KB.