2019-05-31 01:09:56 -07:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-05-18 15:09:15 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2014-03-06 12:10:45 -08:00
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-29 14:36:49 -05:00
|
|
|
|
2009-01-12 10:43:39 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
GFS2: Various gfs2_logd improvements
This patch contains various tweaks to how log flushes and active item writeback
work. gfs2_logd is now managed by a waitqueue, and gfs2_log_reseve now waits
for gfs2_logd to do the log flushing. Multiple functions were rewritten to
remove the need to call gfs2_log_lock(). Instead of using one test to see if
gfs2_logd had work to do, there are now seperate tests to check if there
are two many buffers in the incore log or if there are two many items on the
active items list.
This patch is a port of a patch Steve Whitehouse wrote about a year ago, with
some minor changes. Since gfs2_ail1_start always submits all the active items,
it no longer needs to keep track of the first ai submitted, so this has been
removed. In gfs2_log_reserve(), the order of the calls to
prepare_to_wait_exclusive() and wake_up() when firing off the logd thread has
been switched. If it called wake_up first there was a small window for a race,
where logd could run and return before gfs2_log_reserve was ready to get woken
up. If gfs2_logd ran, but did not free up enough blocks, gfs2_log_reserve()
would be left waiting for gfs2_logd to eventualy run because it timed out.
Finally, gt_logd_secs, which controls how long to wait before gfs2_logd times
out, and flushes the log, can now be set on mount with ar_commit.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2010-05-04 14:29:16 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2020-07-23 13:14:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
2020-07-23 13:14:07 -05:00
|
|
|
|
|
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
2020-07-23 13:14:07 -05:00
|
|
|
|
|
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
2020-07-23 13:14:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-29 14:36:49 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2025-10-29 21:00:18 +00:00
|
|
|
|
2009-05-13 10:56:52 +01:00
|
|
|
|
|
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
gfs2: Rework the log space allocation logic
The current log space allocation logic is hard to understand or extend.
The principle it that when the log is flushed, we may or may not have a
transaction active that has space allocated in the log. To deal with
that, we set aside a magical number of blocks to be used in case we
don't have an active transaction. It isn't clear that the pool will
always be big enough. In addition, we can't return unused log space at
the end of a transaction, so the number of blocks allocated must exactly
match the number of blocks used.
Simplify this as follows:
* When transactions are allocated or merged, always reserve enough
blocks to flush the transaction (err on the safe side).
* In gfs2_log_flush, return any allocated blocks that haven't been used.
* Maintain a pool of spare blocks big enough to do one log flush, as
before.
* In gfs2_log_flush, when we have no active transaction, allocate a
suitable number of blocks. For that, use the spare pool when
called from logd, and leave the pool alone otherwise. This means
that when the log is almost full, logd will still be able to do one
more log flush, which will result in more log space becoming
available.
This will make the log space allocator code easier to work with in
the future.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-10 12:49:56 +01:00
|
|
|
|
2020-12-06 14:04:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-21 15:22:35 +00:00
|
|
|
|
|
|
|
|
|
2020-08-21 08:50:34 -05:00
|
|
|
|
2020-06-05 14:12:34 -05:00
|
|
|
|
|
|
|
|
|
2014-02-21 15:22:35 +00:00
|
|
|
|
2020-12-12 23:30:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-12 16:20:41 +02:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-12 23:30:22 +01:00
|
|
|
|
|
|
|
|
|
2025-10-29 21:00:18 +00:00
|
|
|
|
|
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
2025-10-29 21:00:18 +00:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-29 21:00:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2025-10-29 21:00:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-04-11 14:49:06 -04:00
|
|
|
|
2012-04-16 16:40:56 +01:00
|
|
|
|
2014-11-13 20:42:04 -06:00
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2017-01-25 12:50:47 -05:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
2020-12-12 23:30:22 +01:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
2019-04-17 12:04:27 -06:00
|
|
|
|
2021-02-03 16:15:27 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
|
|
|
|
|
2012-04-16 16:40:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-06 20:10:51 +01:00
|
|
|
|
|
|
|
|
|
2018-10-03 08:47:36 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2021-01-29 16:45:33 +01:00
|
|
|
|
|
|
|
|
|
2019-04-17 12:04:27 -06:00
|
|
|
|
GFS2: replace gfs2_ail structure with gfs2_trans
In order to allow transactions and log flushes to happen at the same
time, gfs2 needs to move the transaction accounting and active items
list code into the gfs2_trans structure. As a first step toward this,
this patch removes the gfs2_ail structure, and handles the active items
list in the gfs_trans structure. This keeps gfs2 from allocating an ail
structure on log flushes, and gives us a struture that can later be used
to store the transaction accounting outside of the gfs2 superblock
structure.
With this patch, at the end of a transaction, gfs2 will add the
gfs2_trans structure to the superblock if there is not one already.
This structure now has the active items fields that were previously in
gfs2_ail. This is not necessary in the case where the transaction was
simply used to add revokes, since these are never written outside of the
journal, and thus, don't need an active items list.
Also, in order to make sure that the transaction structure is not
removed while it's still in use by gfs2_trans_end, unlocking the
sd_log_flush_lock has to happen slightly later in ending the
transaction.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2013-04-05 20:31:46 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2017-11-27 13:05:09 -08:00
|
|
|
|
2018-01-08 10:34:17 -05:00
|
|
|
|
|
|
|
|
|
2021-02-03 16:15:27 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
2018-11-16 14:18:32 -06:00
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-25 11:11:09 -05:00
|
|
|
|
|
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2013-01-28 09:30:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2018-06-04 07:50:16 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
|
|
|
|
|
2013-01-28 09:30:07 +00:00
|
|
|
|
2026-01-23 14:45:46 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2012-11-07 00:38:06 -06:00
|
|
|
|
2017-01-30 11:51:21 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2012-11-07 00:38:06 -06:00
|
|
|
|
2026-03-14 00:41:05 +01:00
|
|
|
|
2012-11-07 00:38:06 -06:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2026-03-14 00:41:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
2017-01-25 12:50:47 -05:00
|
|
|
|
2013-01-28 09:30:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-21 15:22:35 +00:00
|
|
|
|
2013-01-28 09:30:07 +00:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2017-01-30 11:51:21 -05:00
|
|
|
|
2012-11-07 00:38:06 -06:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2025-03-26 22:21:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-14 12:36:02 +00:00
|
|
|
|
|
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2026-01-23 14:45:46 +01:00
|
|
|
|
2023-08-04 22:17:32 +02:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2017-01-25 12:57:42 -05:00
|
|
|
|
2017-01-30 11:51:21 -05:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
|
|
|
|
|
2017-01-30 11:51:21 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2026-03-14 00:41:05 +01:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2026-03-14 00:41:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2012-12-14 17:54:21 +00:00
|
|
|
|
2017-01-25 12:57:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-03 08:47:36 -05:00
|
|
|
|
|
|
|
|
|
2017-01-25 12:57:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-06 17:30:40 +02:00
|
|
|
|
2019-11-13 13:58:30 -06:00
|
|
|
|
|
|
|
|
|
2023-08-04 22:17:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-08-21 22:46:39 +02:00
|
|
|
|
2023-08-04 22:17:32 +02:00
|
|
|
|
2019-11-13 13:58:30 -06:00
|
|
|
|
2017-01-25 12:57:42 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2017-01-30 11:51:21 -05:00
|
|
|
|
2012-12-14 12:52:14 +00:00
|
|
|
|
2012-12-14 12:36:02 +00:00
|
|
|
|
|
|
|
|
|
2007-09-03 11:01:33 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2012-12-14 12:29:56 +00:00
|
|
|
|
|
|
|
|
|
2012-05-01 12:00:34 -04:00
|
|
|
|
2013-06-14 11:38:29 -05:00
|
|
|
|
2017-01-25 12:50:47 -05:00
|
|
|
|
2012-12-14 12:29:56 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2019-04-05 12:18:23 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2008-02-01 13:16:55 +00:00
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2019-04-05 12:16:14 +01:00
|
|
|
|
2008-02-01 13:16:55 +00:00
|
|
|
|
2012-05-01 12:00:34 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2019-11-14 09:49:11 -05:00
|
|
|
|
|
|
|
|
|
2008-02-01 13:16:55 +00:00
|
|
|
|
gfs2: Per-revoke accounting in transactions
In the log, revokes are stored as a revoke descriptor (struct
gfs2_log_descriptor), followed by zero or more additional revoke blocks
(struct gfs2_meta_header). On filesystems with a blocksize of 4k, the
revoke descriptor contains up to 503 revokes, and the metadata blocks
contain up to 509 revokes each. We've so far been reserving space for
revokes in transactions in block granularity, so a lot more space than
necessary was being allocated and then released again.
This patch switches to assigning revokes to transactions individually
instead. Initially, space for the revoke descriptor is reserved and
handed out to transactions. When more revokes than that are reserved,
additional revoke blocks are added. When the log is flushed, the space
for the additional revoke blocks is released, but we keep the space for
the revoke descriptor block allocated.
Transactions may still reserve more revokes than they will actually need
in the end, but now we won't overshoot the target as much, and by only
returning the space for excess revokes at log flush time, we further
reduce the amount of contention between processes.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-12-17 16:14:30 +01:00
|
|
|
|
2008-02-01 13:16:55 +00:00
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2026-03-20 16:43:15 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2019-04-17 12:04:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|