From: "Theodore Ts'o" <tytso@mit.edu>
To: "Lu, Davina" <davinalu@amazon.com>
Cc: "Bhatnagar, Rishabh" <risbhat@amazon.com>,
Jan Kara <jack@suse.cz>, "jack@suse.com" <jack@suse.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Park, SeongJae" <sjpark@amazon.com>
Subject: Re: Tasks stuck jbd2 for a long time
Date: Mon, 21 Aug 2023 14:38:49 -0400 [thread overview]
Message-ID: <ZOOvOT4dL1SCHQDz@mit.edu> (raw)
In-Reply-To: <099884899291490caf6c529929339e50@amazon.com>
On Mon, Aug 21, 2023 at 01:10:58AM +0000, Lu, Davina wrote:
>
> > [2] https://lore.kernel.org/r/53153bdf0cce4675b09bc2ee6483409f@amazon.com
>
> Thanks for pointed out, I almost forget I did this version 2. How
> to replicate this issue : CPU is X86_64, 64 cores, 2.50GHZ, MEM is
> 256GB (it is VM though). Attached with one NVME device (no lvm, drbd
> etc) with IOPS 64000 and 16GiB. I can also replicate with 10000 IOPS
> 1000GiB NVME volume....
Thanks for the details. This is something that am interested in
trying to potentially to merge, since for a sufficiently
coversion-heavy workload (assuming the conversion is happening across
multiple inodes, and not just a huge number of random writes into a
single fallocated file), limiting the number of kernel threads to one
CPU isn't always going to be the right thing. The reason why we had
done this way was because at the time, the only choices that we had
was between a single kernel thread, or spawning a kernel thread for
every single CPU --- which for a very high-core-count system, consumed
a huge amount of system resources. This is no longer the case with
the new Concurrency Managed Workqueue (cmwq), but we never did the
experiment to make sure cmwq didn't have surprising gotchas.
> > Finally, I'm a bit nervous about setting the internal __WQ_ORDERED
> > flag with max_active > 1. What was that all about, anyway?
>
> Yes, you are correct. I didn't use "__WQ_ORDERED" carefully, it
> better not use with max_active > 1 . My purpose was try to guarantee
> the work queue can be sequentially implemented on each core.
I won't have time to look at this before the next merge window, but
what I'm hoping to look at is your patch at [2], with two changes:
a) Drop the _WQ_ORDERED flag, since it is an internal flag.
b) Just pass in 0 for max_active instead of "num_active_cpus() > 1 ?
num_active_cpus() : 1", for two reasons. Num_active_cpus() doesn't
take into account CPU hotplugs (for example, if you have a
dynmically adjustable VM shape where the number of active CPU's
might change over time). Is there a reason why we need to set that
limit?
Do you see any potential problem with these changes?
Thanks,
- Ted
next prev parent reply other threads:[~2023-08-21 18:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 19:01 Tasks stuck jbd2 for a long time Bhatnagar, Rishabh
2023-08-16 2:28 ` Theodore Ts'o
2023-08-16 3:57 ` Bhatnagar, Rishabh
2023-08-16 14:53 ` Jan Kara
2023-08-16 18:32 ` Bhatnagar, Rishabh
2023-08-16 21:52 ` Jan Kara
2023-08-16 22:53 ` Bhatnagar, Rishabh
2023-08-17 10:49 ` Jan Kara
2023-08-17 18:59 ` Bhatnagar, Rishabh
2023-08-18 1:19 ` Theodore Ts'o
2023-08-18 1:31 ` Lu, Davina
2023-08-18 2:41 ` Theodore Ts'o
2023-08-21 1:10 ` Lu, Davina
2023-08-21 18:38 ` Theodore Ts'o [this message]
2023-08-24 3:52 ` Lu, Davina
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=ZOOvOT4dL1SCHQDz@mit.edu \
--to=tytso@mit.edu \
--cc=davinalu@amazon.com \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=risbhat@amazon.com \
--cc=sjpark@amazon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).