Commit 2285e14
dm-crypt: export sysfs of all workqueues
Once there is a heavy IO load, so many encrypt/decrypt work will occupy
all of the cpu, which may lead to the poor performance for other service.
So the improved visibility and controls over dm-crypt workqueues, as
was offered with commit a2b8b2d ("dm crypt: export sysfs of
kcryptd workqueue"), seems necessary. By exporting dm-crypt's
workqueues in sysfs, the entry like cpumask/max_active and so on can
help us to limit the CPU usage for encrypt/decrypt work.
However, commit a2b8b2d did not consider that DM table reload
will call .ctr before .dtr, so the reload for dm-crypt failed because
the same sysfs name was present. This was the original need for commit
48b0777 ("Revert "dm crypt: export sysfs of kcryptd workqueue"").
Reintroduce the use of WQ_SYSFS, and use it for both the IO and crypt
workqueues, but make the workqueue names include a unique id (via ida)
to allow both old and new sysfs entries to coexist.
Signed-off-by: yangerkun <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>1 parent 5268de7 commit 2285e14
1 file changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
2771 | 2774 | | |
2772 | 2775 | | |
2773 | 2776 | | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
2774 | 2780 | | |
2775 | 2781 | | |
2776 | 2782 | | |
| |||
3232 | 3238 | | |
3233 | 3239 | | |
3234 | 3240 | | |
3235 | | - | |
| 3241 | + | |
3236 | 3242 | | |
3237 | 3243 | | |
3238 | 3244 | | |
| |||
3401 | 3407 | | |
3402 | 3408 | | |
3403 | 3409 | | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
3404 | 3418 | | |
3405 | | - | |
| 3419 | + | |
3406 | 3420 | | |
3407 | 3421 | | |
3408 | 3422 | | |
3409 | | - | |
| 3423 | + | |
3410 | 3424 | | |
3411 | 3425 | | |
3412 | 3426 | | |
3413 | 3427 | | |
3414 | 3428 | | |
3415 | 3429 | | |
3416 | | - | |
| 3430 | + | |
3417 | 3431 | | |
3418 | | - | |
| 3432 | + | |
3419 | 3433 | | |
3420 | | - | |
| 3434 | + | |
3421 | 3435 | | |
3422 | | - | |
| 3436 | + | |
3423 | 3437 | | |
3424 | 3438 | | |
3425 | 3439 | | |
| |||
0 commit comments