From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [RFC v5 PATCH 1/9] xfs: set t_task at wait time instead of alloc time
Date: Thu, 27 Feb 2020 08:43:13 -0500 [thread overview]
Message-ID: <20200227134321.7238-2-bfoster@redhat.com> (raw)
In-Reply-To: <20200227134321.7238-1-bfoster@redhat.com>
The xlog_ticket structure contains a task reference to support
blocking for available log reservation. This reference is assigned
at ticket allocation time, which assumes that the transaction
allocator will acquire reservation in the same context. This is
normally true, but will not always be the case with automatic
relogging.
There is otherwise no fundamental reason log space cannot be
reserved for a ticket from a context different from the allocating
context. Move the task assignment to the log reservation blocking
code where it is used.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index f6006d94a581..df60942a9804 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -262,6 +262,7 @@ xlog_grant_head_wait(
int need_bytes) __releases(&head->lock)
__acquires(&head->lock)
{
+ tic->t_task = current;
list_add_tail(&tic->t_queue, &head->waiters);
do {
@@ -3601,7 +3602,6 @@ xlog_ticket_alloc(
unit_res = xfs_log_calc_unit_res(log->l_mp, unit_bytes);
atomic_set(&tic->t_ref, 1);
- tic->t_task = current;
INIT_LIST_HEAD(&tic->t_queue);
tic->t_unit_res = unit_res;
tic->t_curr_res = unit_res;
--
2.21.1
next prev parent reply other threads:[~2020-02-27 14:48 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 13:43 [RFC v5 PATCH 0/9] xfs: automatic relogging experiment Brian Foster
2020-02-27 13:43 ` Brian Foster [this message]
2020-02-27 20:48 ` [RFC v5 PATCH 1/9] xfs: set t_task at wait time instead of alloc time Allison Collins
2020-02-27 23:28 ` Darrick J. Wong
2020-02-28 0:10 ` Dave Chinner
2020-02-28 13:46 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 2/9] xfs: introduce ->tr_relog transaction Brian Foster
2020-02-27 20:49 ` Allison Collins
2020-02-27 23:31 ` Darrick J. Wong
2020-02-28 13:52 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 3/9] xfs: automatic relogging reservation management Brian Foster
2020-02-27 20:49 ` Allison Collins
2020-02-28 0:02 ` Darrick J. Wong
2020-02-28 13:55 ` Brian Foster
2020-03-02 3:07 ` Dave Chinner
2020-03-02 18:06 ` Brian Foster
2020-03-02 23:25 ` Dave Chinner
2020-03-03 4:07 ` Dave Chinner
2020-03-03 15:12 ` Brian Foster
2020-03-03 21:47 ` Dave Chinner
2020-03-03 14:13 ` Brian Foster
2020-03-03 21:26 ` Dave Chinner
2020-03-04 14:03 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 4/9] xfs: automatic relogging item management Brian Foster
2020-02-27 21:18 ` Allison Collins
2020-03-02 5:58 ` Dave Chinner
2020-03-02 18:08 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 5/9] xfs: automatic log item relog mechanism Brian Foster
2020-02-27 22:54 ` Allison Collins
2020-02-28 0:13 ` Darrick J. Wong
2020-02-28 14:02 ` Brian Foster
2020-03-02 7:32 ` Dave Chinner
2020-03-02 7:18 ` Dave Chinner
2020-03-02 18:52 ` Brian Foster
2020-03-03 0:06 ` Dave Chinner
2020-03-03 14:14 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 6/9] xfs: automatically relog the quotaoff start intent Brian Foster
2020-02-27 23:19 ` Allison Collins
2020-02-28 14:03 ` Brian Foster
2020-02-28 18:55 ` Allison Collins
2020-02-28 1:16 ` Darrick J. Wong
2020-02-28 14:04 ` Brian Foster
2020-02-29 5:35 ` Darrick J. Wong
2020-02-29 12:15 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 7/9] xfs: buffer relogging support prototype Brian Foster
2020-02-27 23:33 ` Allison Collins
2020-02-28 14:04 ` Brian Foster
2020-03-02 7:47 ` Dave Chinner
2020-03-02 19:00 ` Brian Foster
2020-03-03 0:09 ` Dave Chinner
2020-03-03 14:14 ` Brian Foster
2020-02-27 13:43 ` [RFC v5 PATCH 8/9] xfs: create an error tag for random relog reservation Brian Foster
2020-02-27 23:35 ` Allison Collins
2020-02-27 13:43 ` [RFC v5 PATCH 9/9] xfs: relog random buffers based on errortag Brian Foster
2020-02-27 23:48 ` Allison Collins
2020-02-28 14:06 ` Brian Foster
2020-02-27 15:09 ` [RFC v5 PATCH 0/9] xfs: automatic relogging experiment Darrick J. Wong
2020-02-27 15:18 ` Brian Foster
2020-02-27 15:22 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200227134321.7238-2-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox