From: Jens Axboe <[email protected]>
To: Xiaoguang Wang <[email protected]>,
[email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] io_uring: execute task_work_run() before dropping mm
Date: Sat, 6 Jun 2020 12:50:17 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 6/6/20 9:12 AM, Xiaoguang Wang wrote:
> While testing io_uring in our internal kernel, note it's not upstream
> kernel, we see below panic:
> [ 872.498723] x29: ffff00002d553cf0 x28: 0000000000000000
> [ 872.508973] x27: ffff807ef691a0e0 x26: 0000000000000000
> [ 872.519116] x25: 0000000000000000 x24: ffff0000090a7980
> [ 872.529184] x23: ffff000009272060 x22: 0000000100022b11
> [ 872.539144] x21: 0000000046aa5668 x20: ffff80bee8562b18
> [ 872.549000] x19: ffff80bee8562080 x18: 0000000000000000
> [ 872.558876] x17: 0000000000000000 x16: 0000000000000000
> [ 872.568976] x15: 0000000000000000 x14: 0000000000000000
> [ 872.578762] x13: 0000000000000000 x12: 0000000000000000
> [ 872.588474] x11: 0000000000000000 x10: 0000000000000c40
> [ 872.598324] x9 : ffff000008100c00 x8 : 000000007ffff000
> [ 872.608014] x7 : ffff80bee8562080 x6 : ffff80beea862d30
> [ 872.617709] x5 : 0000000000000000 x4 : ffff80beea862d48
> [ 872.627399] x3 : ffff80bee8562b18 x2 : 0000000000000000
> [ 872.637044] x1 : ffff0000090a7000 x0 : 0000000000208040
> [ 872.646575] Call trace:
> [ 872.653139] task_numa_work+0x4c/0x310
> [ 872.660916] task_work_run+0xb0/0xe0
> [ 872.668400] io_sq_thread+0x164/0x388
> [ 872.675829] kthread+0x108/0x138
>
> The reason is that once io_sq_thread has a valid mm, schedule subsystem
> may call task_tick_numa() adding a task_numa_work() callback, which will
> visit mm, then above panic will happen.>
> To fix this bug, only call task_work_run() before dropping mm.
That's a bug outside of io_uring, you'll want to backport this patch
from 5.7:
commit 18f855e574d9799a0e7489f8ae6fd8447d0dd74a
Author: Jens Axboe <[email protected]>
Date: Tue May 26 09:38:31 2020 -0600
sched/fair: Don't NUMA balance for kthreads
--
Jens Axboe
next prev parent reply other threads:[~2020-06-06 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 15:12 [PATCH] io_uring: execute task_work_run() before dropping mm Xiaoguang Wang
2020-06-06 15:55 ` Pavel Begunkov
2020-06-06 16:39 ` Pavel Begunkov
2020-06-07 12:37 ` Xiaoguang Wang
2020-06-07 15:36 ` Pavel Begunkov
2020-06-06 18:50 ` Jens Axboe [this message]
2020-06-07 11:41 ` Xiaoguang Wang
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] \
[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