From: "Theodore Ts'o" <tytso@mit.edu>
To: Shashidhar Patil <shashidhar.patil@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: jbd2 task hung in jbd2_journal_commit_transaction
Date: Wed, 17 Mar 2021 13:05:59 -0400 [thread overview]
Message-ID: <YFI299oMXylsG9kB@mit.edu> (raw)
In-Reply-To: <CADve3d4h7QmxJUCe8ggHtSb41PbDnvZoj4_m74hHgYD96xjZNw@mail.gmail.com>
On Wed, Mar 17, 2021 at 08:30:56PM +0530, Shashidhar Patil wrote:
> Hi Theodore,
> Thank you for the details about the journalling layer and
> insight into the block device layer.
> I think Good luck might have clicked. The swap file in our case is
> attached to a loop block device before enabling swap using swapon.
> Since loop driver processes its IO requests by calling
> vfs_iter_write() the write requests re-enter the ext4
> filesystem/journalling code.
> Is that right ? There seems to be a possibility of cylic dependency.
If that hypothesis is correct, you should see an example of that in
one of your stack traces; do you? The loop device creates struct file
where the file is opened using O_DIRECT. In the O_DIRECT code path,
assuming the file was fully allocate and initialized, it shouldn't
involve starting a journal handle.
That being said, why are you using a loop device for a swap device at
all? Using a swap file directly is going to be much more efficient,
and decrease the stack depth and CPU cycles needed to do a swap out if
nothing else. If you can reliably reproduce the problem, what happens
if you use a swap file directly and cut out the loop device as a swap
device? Does it make the problem go away?
- Ted
next prev parent reply other threads:[~2021-03-17 17:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 8:03 jbd2 task hung in jbd2_journal_commit_transaction Shashidhar Patil
2021-03-12 12:51 ` Theodore Ts'o
2021-03-13 7:59 ` Shashidhar Patil
2021-03-14 3:38 ` Theodore Ts'o
2021-03-17 15:00 ` Shashidhar Patil
2021-03-17 17:05 ` Theodore Ts'o [this message]
2021-03-18 6:57 ` Shashidhar Patil
2021-03-19 15:16 ` Theodore Ts'o
2021-03-22 6:34 ` Shashidhar Patil
2021-03-19 4:39 ` Shashidhar Patil
-- strict thread matches above, loose matches on Subject: below --
2021-02-15 12:06 Shashidhar Patil
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=YFI299oMXylsG9kB@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=shashidhar.patil@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.