* [PATCH 1/2] dm integrity: use alloc_ordered_workqueue() for dm-integrity-wait
@ 2022-01-10 23:25 ` Michał Mirosław
0 siblings, 0 replies; 4+ messages in thread
From: Michał Mirosław @ 2022-01-10 23:25 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer; +Cc: dm-devel, linux-kernel
Make the requirement for ordering of dm-integrity-wait work
explicit. No behaviour change because of commit 5c0338c68706
("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered").
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/md/dm-integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 7af242de3202..6dc9aebf8487 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4212,7 +4212,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
* If this workqueue were percpu, it would cause bio reordering
* and reduced performance.
*/
- ic->wait_wq = alloc_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+ ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM);
if (!ic->wait_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [dm-devel] [PATCH 1/2] dm integrity: use alloc_ordered_workqueue() for dm-integrity-wait
@ 2022-01-10 23:25 ` Michał Mirosław
0 siblings, 0 replies; 4+ messages in thread
From: Michał Mirosław @ 2022-01-10 23:25 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer; +Cc: dm-devel, linux-kernel
Make the requirement for ordering of dm-integrity-wait work
explicit. No behaviour change because of commit 5c0338c68706
("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered").
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/md/dm-integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 7af242de3202..6dc9aebf8487 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4212,7 +4212,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
* If this workqueue were percpu, it would cause bio reordering
* and reduced performance.
*/
- ic->wait_wq = alloc_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
+ ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM);
if (!ic->wait_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
--
2.30.2
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dm integrity: mark workqueues with device they belong to
2022-01-10 23:25 ` [dm-devel] " Michał Mirosław
@ 2022-01-10 23:25 ` Michał Mirosław
-1 siblings, 0 replies; 4+ messages in thread
From: Michał Mirosław @ 2022-01-10 23:25 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer; +Cc: dm-devel, linux-kernel
Add device name to workqueue names to help debugging CPU usage per
device mapper target.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/md/dm-integrity.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 6dc9aebf8487..cd60488938ea 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -3958,6 +3958,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error)
*/
static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
{
+ const char *devname = dm_table_device_name(ti->table);
struct dm_integrity_c *ic;
char dummy;
int r;
@@ -4200,8 +4201,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
goto bad;
}
- ic->metadata_wq = alloc_workqueue("dm-integrity-metadata",
- WQ_MEM_RECLAIM, METADATA_WORKQUEUE_MAX_ACTIVE);
+ ic->metadata_wq = alloc_workqueue("dm-integrity-metadata/%s", WQ_MEM_RECLAIM,
+ METADATA_WORKQUEUE_MAX_ACTIVE, devname);
if (!ic->metadata_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4212,22 +4213,22 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
* If this workqueue were percpu, it would cause bio reordering
* and reduced performance.
*/
- ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM);
+ ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait/%s", WQ_MEM_RECLAIM, devname);
if (!ic->wait_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
goto bad;
}
- ic->offload_wq = alloc_workqueue("dm-integrity-offload", WQ_MEM_RECLAIM,
- METADATA_WORKQUEUE_MAX_ACTIVE);
+ ic->offload_wq = alloc_workqueue("dm-integrity-offload/%s", WQ_MEM_RECLAIM,
+ METADATA_WORKQUEUE_MAX_ACTIVE, devname);
if (!ic->offload_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
goto bad;
}
- ic->commit_wq = alloc_workqueue("dm-integrity-commit", WQ_MEM_RECLAIM, 1);
+ ic->commit_wq = alloc_workqueue("dm-integrity-commit/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->commit_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4236,7 +4237,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
INIT_WORK(&ic->commit_work, integrity_commit);
if (ic->mode == 'J' || ic->mode == 'B') {
- ic->writer_wq = alloc_workqueue("dm-integrity-writer", WQ_MEM_RECLAIM, 1);
+ ic->writer_wq = alloc_workqueue("dm-integrity-writer/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->writer_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4395,7 +4396,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
}
if (ic->internal_hash) {
- ic->recalc_wq = alloc_workqueue("dm-integrity-recalc", WQ_MEM_RECLAIM, 1);
+ ic->recalc_wq = alloc_workqueue("dm-integrity-recalc/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->recalc_wq ) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [dm-devel] [PATCH 2/2] dm integrity: mark workqueues with device they belong to
@ 2022-01-10 23:25 ` Michał Mirosław
0 siblings, 0 replies; 4+ messages in thread
From: Michał Mirosław @ 2022-01-10 23:25 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer; +Cc: dm-devel, linux-kernel
Add device name to workqueue names to help debugging CPU usage per
device mapper target.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
drivers/md/dm-integrity.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 6dc9aebf8487..cd60488938ea 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -3958,6 +3958,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error)
*/
static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
{
+ const char *devname = dm_table_device_name(ti->table);
struct dm_integrity_c *ic;
char dummy;
int r;
@@ -4200,8 +4201,8 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
goto bad;
}
- ic->metadata_wq = alloc_workqueue("dm-integrity-metadata",
- WQ_MEM_RECLAIM, METADATA_WORKQUEUE_MAX_ACTIVE);
+ ic->metadata_wq = alloc_workqueue("dm-integrity-metadata/%s", WQ_MEM_RECLAIM,
+ METADATA_WORKQUEUE_MAX_ACTIVE, devname);
if (!ic->metadata_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4212,22 +4213,22 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
* If this workqueue were percpu, it would cause bio reordering
* and reduced performance.
*/
- ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait", WQ_MEM_RECLAIM);
+ ic->wait_wq = alloc_ordered_workqueue("dm-integrity-wait/%s", WQ_MEM_RECLAIM, devname);
if (!ic->wait_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
goto bad;
}
- ic->offload_wq = alloc_workqueue("dm-integrity-offload", WQ_MEM_RECLAIM,
- METADATA_WORKQUEUE_MAX_ACTIVE);
+ ic->offload_wq = alloc_workqueue("dm-integrity-offload/%s", WQ_MEM_RECLAIM,
+ METADATA_WORKQUEUE_MAX_ACTIVE, devname);
if (!ic->offload_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
goto bad;
}
- ic->commit_wq = alloc_workqueue("dm-integrity-commit", WQ_MEM_RECLAIM, 1);
+ ic->commit_wq = alloc_workqueue("dm-integrity-commit/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->commit_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4236,7 +4237,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
INIT_WORK(&ic->commit_work, integrity_commit);
if (ic->mode == 'J' || ic->mode == 'B') {
- ic->writer_wq = alloc_workqueue("dm-integrity-writer", WQ_MEM_RECLAIM, 1);
+ ic->writer_wq = alloc_workqueue("dm-integrity-writer/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->writer_wq) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
@@ -4395,7 +4396,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
}
if (ic->internal_hash) {
- ic->recalc_wq = alloc_workqueue("dm-integrity-recalc", WQ_MEM_RECLAIM, 1);
+ ic->recalc_wq = alloc_workqueue("dm-integrity-recalc/%s", WQ_MEM_RECLAIM, 1, devname);
if (!ic->recalc_wq ) {
ti->error = "Cannot allocate workqueue";
r = -ENOMEM;
--
2.30.2
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-10 23:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 23:25 [PATCH 1/2] dm integrity: use alloc_ordered_workqueue() for dm-integrity-wait Michał Mirosław
2022-01-10 23:25 ` [dm-devel] " Michał Mirosław
2022-01-10 23:25 ` [PATCH 2/2] dm integrity: mark workqueues with device they belong to Michał Mirosław
2022-01-10 23:25 ` [dm-devel] " Michał Mirosław
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.