9.23. Memory allocations for transactions
If it is in a transaction, the memory allocation code will behave differently to try to ensure this critical thread does not sleep
You could have a whole lot of dirty page cache pages but in order to flush those out you have to call back into XFS which can allocate memory.
Recent changes to XFS means we are much better at managing memory allocation and helps us to avoid these issues