* [dm-devel] [PATCH] dm crypt: export sysfs of kcryptd workqueue
@ 2020-11-30 11:33 Jeffle Xu
2020-12-02 4:04 ` JeffleXu
0 siblings, 1 reply; 3+ messages in thread
From: Jeffle Xu @ 2020-11-30 11:33 UTC (permalink / raw)
To: snitzer; +Cc: joseph.qi, dm-devel
It should be helpful to export sysfs of "kcryptd" workqueue in some
cases, such as setting specific CPU affinity of the workqueue.
Besides, also tweak the name format a little. The slash inside a
directory name will be translate into exclamation mark, such as
/sys/devices/virtual/workqueue/'kcryptd!253:0'.
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
drivers/md/dm-crypt.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 392337f16ecf..6b4c1f674239 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -3166,11 +3166,12 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}
if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags))
- cc->crypt_queue = alloc_workqueue("kcryptd/%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
+ cc->crypt_queue = alloc_workqueue("kcryptd-%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
1, devname);
else
- cc->crypt_queue = alloc_workqueue("kcryptd/%s",
- WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND,
+ cc->crypt_queue = alloc_workqueue("kcryptd-%s",
+ WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM |
+ WQ_UNBOUND | WQ_SYSFS,
num_online_cpus(), devname);
if (!cc->crypt_queue) {
ti->error = "Couldn't create kcryptd queue";
--
2.27.0
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [dm-devel] [PATCH] dm crypt: export sysfs of kcryptd workqueue
2020-11-30 11:33 [dm-devel] [PATCH] dm crypt: export sysfs of kcryptd workqueue Jeffle Xu
@ 2020-12-02 4:04 ` JeffleXu
2020-12-02 15:19 ` [dm-devel] " Mike Snitzer
0 siblings, 1 reply; 3+ messages in thread
From: JeffleXu @ 2020-12-02 4:04 UTC (permalink / raw)
To: snitzer; +Cc: joseph.qi, dm-devel
Hi Mike,
What about this patch?
On 11/30/20 7:33 PM, Jeffle Xu wrote:
> It should be helpful to export sysfs of "kcryptd" workqueue in some
> cases, such as setting specific CPU affinity of the workqueue.
>
> Besides, also tweak the name format a little. The slash inside a
> directory name will be translate into exclamation mark, such as
> /sys/devices/virtual/workqueue/'kcryptd!253:0'.
>
> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> ---
> drivers/md/dm-crypt.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
> index 392337f16ecf..6b4c1f674239 100644
> --- a/drivers/md/dm-crypt.c
> +++ b/drivers/md/dm-crypt.c
> @@ -3166,11 +3166,12 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
> }
>
> if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags))
> - cc->crypt_queue = alloc_workqueue("kcryptd/%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
> + cc->crypt_queue = alloc_workqueue("kcryptd-%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
> 1, devname);
> else
> - cc->crypt_queue = alloc_workqueue("kcryptd/%s",
> - WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND,
> + cc->crypt_queue = alloc_workqueue("kcryptd-%s",
> + WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM |
> + WQ_UNBOUND | WQ_SYSFS,
> num_online_cpus(), devname);
> if (!cc->crypt_queue) {
> ti->error = "Couldn't create kcryptd queue";
>
--
Thanks,
Jeffle
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-devel] dm crypt: export sysfs of kcryptd workqueue
2020-12-02 4:04 ` JeffleXu
@ 2020-12-02 15:19 ` Mike Snitzer
0 siblings, 0 replies; 3+ messages in thread
From: Mike Snitzer @ 2020-12-02 15:19 UTC (permalink / raw)
To: JeffleXu; +Cc: joseph.qi, dm-devel
On Tue, Dec 01 2020 at 11:04pm -0500,
JeffleXu <jefflexu@linux.alibaba.com> wrote:
> Hi Mike,
>
> What about this patch?
>
> On 11/30/20 7:33 PM, Jeffle Xu wrote:
> > It should be helpful to export sysfs of "kcryptd" workqueue in some
> > cases, such as setting specific CPU affinity of the workqueue.
> >
> > Besides, also tweak the name format a little. The slash inside a
> > directory name will be translate into exclamation mark, such as
> > /sys/devices/virtual/workqueue/'kcryptd!253:0'.
> >
> > Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> > ---
> > drivers/md/dm-crypt.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
> > index 392337f16ecf..6b4c1f674239 100644
> > --- a/drivers/md/dm-crypt.c
> > +++ b/drivers/md/dm-crypt.c
> > @@ -3166,11 +3166,12 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
> > }
> >
> > if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags))
> > - cc->crypt_queue = alloc_workqueue("kcryptd/%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
> > + cc->crypt_queue = alloc_workqueue("kcryptd-%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
> > 1, devname);
> > else
> > - cc->crypt_queue = alloc_workqueue("kcryptd/%s",
> > - WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND,
> > + cc->crypt_queue = alloc_workqueue("kcryptd-%s",
> > + WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM |
> > + WQ_UNBOUND | WQ_SYSFS,
> > num_online_cpus(), devname);
> > if (!cc->crypt_queue) {
> > ti->error = "Couldn't create kcryptd queue";
> >
Looks fine, I'll get it staged for 5.11.
Mike
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-02 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30 11:33 [dm-devel] [PATCH] dm crypt: export sysfs of kcryptd workqueue Jeffle Xu
2020-12-02 4:04 ` JeffleXu
2020-12-02 15:19 ` [dm-devel] " Mike Snitzer
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).