From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4][RESEND] cancel all reqs of an exiting task
Date: Mon, 15 Jun 2020 09:04:15 -0600 [thread overview]
Message-ID: <8033114e-069d-e8d0-f476-1f4d4bed3e25@kernel.dk> (raw)
In-Reply-To: <cover.1592205754.git.asml.silence@gmail.com>
On 6/15/20 1:24 AM, Pavel Begunkov wrote:
> io_uring_flush() {
> ...
> if (fatal_signal_pending(current) || (current->flags & PF_EXITING))
> io_wq_cancel_pid(ctx->io_wq, task_pid_vnr(current));
> }
>
> This cancels only the first matched request. The pathset is mainly
> about fixing that. [1,2] are preps, [3/4] is the fix.
>
> The [4/4] tries to improve the worst case for io_uring_cancel_files(),
> that's when they are a lot of inflights with ->files. Instead of doing
> {kill(); wait();} one by one, it cancels all of them at once.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-06-15 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 7:24 [PATCH v2 0/4][RESEND] cancel all reqs of an exiting task Pavel Begunkov
2020-06-15 7:24 ` [PATCH v2 1/4] io-wq: reorder cancellation pending -> running Pavel Begunkov
2020-06-15 7:24 ` [PATCH v2 2/4] io-wq: add an option to cancel all matched reqs Pavel Begunkov
2020-06-15 7:24 ` [PATCH v2 3/4] io_uring: cancel all task's requests on exit Pavel Begunkov
2020-06-15 7:24 ` [PATCH v2 4/4] io_uring: batch cancel in io_uring_cancel_files() Pavel Begunkov
2020-06-15 15:04 ` Jens Axboe [this message]
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=8033114e-069d-e8d0-f476-1f4d4bed3e25@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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