[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/ukSBodK65MEsuL@biznet-home.integral.gnuweeb.org>
Date: Mon, 27 Feb 2023 01:26:16 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Tejun Heo <tj@...nel.org>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Filipe Manana <fdmanana@...e.com>,
Linux Btrfs Mailing List <linux-btrfs@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Fsdevel Mailing List <linux-fsdevel@...r.kernel.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>
Subject: Re: [RFC PATCH v1 0/6] Introducing `wq_cpu_set` mount option for
btrfs
Hello,
On Sun, 26 Feb 2023 07:01:41 -1000, Tejun Heo wrote:
> Hmm... the allowed cpumasks for unbounded workqueues can already be set
> through /sys/devices/virtual/workqueue/cpumask and also each individual
> workqueue can be exposed in the matching subdirectory by setting WQ_SYSFS.
> Wouldn't the proposed btrfs option be a bit reduandant?
Thank you for the comment. I just realized the sysfs facility for this.
So I will take a look into it deeper. For now, I have several reasons to
use the `wq_cpu_set` option:
1. Currently, there are 15 btrfs workqueues. It would not be convenient
to let the user manage each of them via the sysfs. Using `wq_cpu_set`
option at mounting time allows the user to set all of them in one
shot.
(for btrfs maintainers):
I am also not sure if the number of btrfs workqueues is stable so
that the user can rely on the WQ_SYSFS facility.
2. I looked at /sys/devices/virtual/workqueue/ and saw its
subdirectories. The directory name is taken from the wq->name. But
how to distinguish multiple workqueues with the same name?
Each btrfs mount will at least do this:
alloc_workqueue("btrfs-compressed-write", flags, max_active);
When we do:
mount -t -o rw btrfs /dev/sda1 a;
mount -t -o rw btrfs /dev/sda2 b;
mount -t -o rw btrfs /dev/sda3 c;
mount -t -o rw btrfs /dev/sda4 d;
Is there a way to identify which sysfs devices correspond to a specific
mounted btrfs fs workqueues? Let's say I want each mount to have a
different CPU mask.
--
Ammar Faizi
Powered by blists - more mailing lists