From: Josef Bacik <josef@toxicpanda.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: axboe@kernel.dk, bvanassche@acm.org, linux-block@vger.kernel.org,
nbd@other.debian.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] nbd: Don't use workqueue to handle recv work
Date: Tue, 22 Mar 2022 16:11:38 -0400 [thread overview]
Message-ID: <YjotekJZcSvwoZhp@localhost.localdomain> (raw)
In-Reply-To: <20211227091241.103-1-xieyongji@bytedance.com>
On Mon, Dec 27, 2021 at 05:12:41PM +0800, Xie Yongji wrote:
> The rescuer thread might take over the works queued on
> the workqueue when the worker thread creation timed out.
> If this happens, we have no chance to create multiple
> recv threads which causes I/O hung on this nbd device.
>
> To fix it, we can not simply remove the WQ_MEM_RECLAIM
> flag since the recv work is in the memory reclaim path.
> So this patch tries to create kthreads directly to
> handle the recv work instead of using workqueue.
>
I still don't understand why we can't drop WQ_MEM_RECLAIM. IIRC your argument
is that we need it because a reconnect could happen under memory pressure and we
need to be able to queue work for that. However your code makes it so we're
just doing a kthread_create(), which isn't coming out of some emergency pool, so
it's just as likely to fail as a !WQ_MEM_RECLAIM workqueue. Thanks,
Josef
next prev parent reply other threads:[~2022-03-22 20:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-27 9:12 [PATCH v2] nbd: Don't use workqueue to handle recv work Xie Yongji
2021-12-29 17:35 ` Christoph Hellwig
2021-12-30 4:01 ` Yongji Xie
2022-01-03 16:10 ` Josef Bacik
2022-01-04 5:31 ` Yongji Xie
2022-01-04 18:06 ` Josef Bacik
2022-01-05 5:36 ` Yongji Xie
2022-01-21 8:34 ` Yongji Xie
2022-02-15 13:17 ` Yongji Xie
2022-02-18 15:20 ` Josef Bacik
2022-02-19 13:04 ` Yongji Xie
2022-03-22 8:10 ` Yongji Xie
2022-03-22 20:11 ` Josef Bacik [this message]
2022-03-23 11:21 ` Yongji Xie
2022-05-16 6:13 ` Yongji Xie
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=YjotekJZcSvwoZhp@localhost.localdomain \
--to=josef@toxicpanda.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@other.debian.org \
--cc=xieyongji@bytedance.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.