From: Jens Axboe <axboe@kernel.dk>
To: Hillf Danton <hdanton@sina.com>
Cc: Zhang Qiang <qiang.zhang@windriver.com>,
viro@zeniv.linux.org.uk, io-uring@vger.kernel.org,
Pavel Begunkov <asml.silence@gmail.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Question on io-wq
Date: Thu, 22 Oct 2020 20:24:16 -0600 [thread overview]
Message-ID: <e61d3c07-7db0-28d8-03a0-cae13698a634@kernel.dk> (raw)
In-Reply-To: <20201023020514.2230-1-hdanton@sina.com>
On 10/22/20 8:05 PM, Hillf Danton wrote:
> On Thu, 22 Oct 2020 08:08:09 -0600 Jens Axboe wrote:
>> On 10/22/20 3:02 AM, Zhang,Qiang wrote:
>>>
>>> Hi Jens Axboe
>>>
>>> There are some problem in 'io_wqe_worker' thread, when the
>>> 'io_wqe_worker' be create and Setting the affinity of CPUs in NUMA
>>> nodes, due to CPU hotplug, When the last CPU going down, the
>>> 'io_wqe_worker' thread will run anywhere. when the CPU in the node goes
>>> online again, we should restore their cpu bindings?
>>
>> Something like the below should help in ensuring affinities are
>> always correct - trigger an affinity set for an online CPU event. We
>> should not need to do it for offlining. Can you test it?
>
> CPU affinity is intact because of nothing to do on offline, and scheduler
> will move the stray workers on to the correct NUMA node if any CPU goes
> online, so it's a bit hard to see what is going to be tested.
Test it yourself:
- Boot with > 1 NUMA node
- Start an io_uring, you now get 2 workers, each affinitized to a node
- Now offline all CPUs in one node
- Online one or more of the CPU in that same node
The end result is that the worker on the node that was offlined now
has a mask of the other node, plus the newly added CPU.
So your last statement isn't correct, which is what the original
reporter stated.
--
Jens Axboe
next prev parent reply other threads:[~2020-10-23 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 9:02 Zhang,Qiang
2020-10-22 14:08 ` Jens Axboe
2020-10-23 3:55 ` 回复: " Zhang, Qiang
2020-10-23 3:57 ` Zhang, Qiang
[not found] ` <20201023020514.2230-1-hdanton@sina.com>
2020-10-23 2:24 ` Jens Axboe [this message]
2020-10-22 9:03 Zhang, Qiang
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 \
--in-reply-to=e61d3c07-7db0-28d8-03a0-cae13698a634@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=hdanton@sina.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qiang.zhang@windriver.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®