From: Stefan Metzmacher <[email protected]>
To: Jens Axboe <[email protected]>,
Samba Technical <[email protected]>,
io-uring <[email protected]>
Subject: Re: Samba with multichannel and io_uring
Date: Fri, 16 Oct 2020 13:49:41 +0200 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
[-- Attachment #1.1: Type: text/plain, Size: 2393 bytes --]
Hi Jens,
> Thanks for sending this, very interesting! As per this email, I took a
> look at the NUMA bindings. If you can, please try this one-liner below.
> I'd be interested to know if that removes the fluctuations you're seeing
> due to bad locality.
>
> Looks like kthread_create_on_node() doesn't actually do anything (at
> least in terms of binding).
>
>
> diff --git a/fs/io-wq.c b/fs/io-wq.c
> index 74b84e8562fb..7bebb198b3df 100644
> --- a/fs/io-wq.c
> +++ b/fs/io-wq.c
> @@ -676,6 +676,7 @@ static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index)
> kfree(worker);
> return false;
> }
> + kthread_bind_mask(worker->task, cpumask_of_node(wqe->node));
>
> raw_spin_lock_irq(&wqe->lock);
> hlist_nulls_add_head_rcu(&worker->nulls_node, &wqe->free_list);
>
I no longer have access to that system, but I guess it will help, thanks!
With this:
worker->task = kthread_create_on_node(io_wqe_worker, worker, wqe->node,
"io_wqe_worker-%d/%d", index, wqe->node);
I see only "io_wqe_worker-0" and "io_wqe_worker-1" in top, without '/0' or '/1' at the end,
this is because set_task_comm() truncates to 15 characters.
As developer I think 'io_wqe' is really confusing, just from reading I thought it
means "work queue entry", but it's a per numa node worker pool container...
'struct io_wq_node *wqn' would be easier to understand for me...
Would it make sense to give each io_wq a unique identifier and use names like this:
(fdinfo of the io_uring fd could also include the io_wq id)
"io_wq-%u-%u%c", wq->id, wqn->node, index == IO_WQ_ACCT_BOUND ? 'B' : 'U')
io_wq-500-M
io_wq-500-0B
io_wq-500-0B
io_wq-500-1B
io_wq-500-0U
io_wq-200-M
io_wq-200-0B
io_wq-200-0B
io_wq-200-1B
io_wq-200-0U
I'm not sure how this interacts with workers moving between bound and unbound
and maybe a worker id might also be useful (or we rely on their pid)
I just found that proc_task_name() handles PF_WQ_WORKER special
and cat /proc/$pid/comm can expose something like:
kworker/u17:2-btrfs-worker-high
ps and top still truncate, but that can be fixed.
Some workqueues also expose their details under /sys/bus/workqueue/.
I guess there's a lot of potential to optimize the details exposed to the admins
and (userspace) developers.
metze
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-10-16 11:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 9:58 Samba with multichannel and io_uring Stefan Metzmacher
2020-10-15 10:06 ` Ralph Boehme
2020-10-15 15:45 ` Jeremy Allison
2020-10-15 16:11 ` Jens Axboe
2020-10-16 11:49 ` Stefan Metzmacher [this message]
2020-10-16 12:28 ` Stefan Metzmacher
2020-10-16 12:40 ` Stefan Metzmacher
2020-10-16 18:56 ` Jens Axboe
2020-10-16 15:57 ` Jens Axboe
2020-10-16 16:03 ` Stefan Metzmacher
2020-10-16 16:06 ` Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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