Files
Ross Zwisler a5f728e5c7 ext4: introduce jbd2_inode dirty range scoping and use it on ext4
jbd2: introduce jbd2_inode dirty range scoping:
Currently both journal_submit_inode_data_buffers() and
journal_finish_inode_data_buffers() operate on the entire address space
of each of the inodes associated with a given journal entry.  The
consequence of this is that if we have an inode where we are constantly
appending dirty pages we can end up waiting for an indefinite amount of
time in journal_finish_inode_data_buffers() while we wait for all the
pages under writeback to be written out.

The easiest way to cause this type of workload is do just dd from
/dev/zero to a file until it fills the entire filesystem.  This can
cause journal_finish_inode_data_buffers() to wait for the duration of
the entire dd operation.

We can improve this situation by scoping each of the inode dirty ranges
associated with a given transaction.  We do this via the jbd2_inode
structure so that the scoping is contained within jbd2 and so that it
follows the lifetime and locking rules for that structure.

This allows us to limit the writeback & wait in
journal_submit_inode_data_buffers() and
journal_finish_inode_data_buffers() respectively to the dirty range for
a given struct jdb2_inode, keeping us from waiting forever if the inode
in question is still being appended to.

ext4: use jbd2_inode dirty range scoping:
Use the newly introduced jbd2_inode dirty range scoping to prevent us
from waiting forever when trying to complete a journal transaction.

jbd2: Introduce jbd2_inode next dirty range scoping:
Distinguish between the current dirty range and the next dirty range.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Change-Id: Idd339a5f4edbcd16e16fe4a861eb28c3ac7a08bd
2024-01-07 14:05:43 +00:00
..
2020-11-10 10:22:17 +01:00
2019-08-06 18:28:27 +02:00
2018-10-22 19:15:30 -07:00
2021-10-09 13:42:14 +02:00
2021-11-26 11:58:40 +01:00
2019-03-23 08:44:21 +01:00
2020-06-03 09:38:51 +02:00
2021-02-10 09:07:27 +01:00
2021-12-14 10:03:49 +01:00