public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] io_uring/cmd: let cmds to know about dying task
Date: Mon, 4 Nov 2024 09:15:39 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <55888b6a644b4fc490849832fd5c5e5bfed523ef.1730687879.git.asml.silence@gmail.com>

On 11/4/24 9:12 AM, Pavel Begunkov wrote:
> When the taks that submitted a request is dying, a task work for that
> request might get run by a kernel thread or even worse by a half
> dismantled task. We can't just cancel the task work without running the
> callback as the cmd might need to do some clean up, so pass a flag
> instead. If set, it's not safe to access any task resources and the
> callback is expected to cancel the cmd ASAP.
> 
> Signed-off-by: Pavel Begunkov <[email protected]>
> ---
> 
> Made a bit fancier to avoid conflicts. Mark, as before I'd suggest you
> to take it and send together with the fix.

That's fine, or we can just take it through the io_uring tree, it's not
like this matters as both will land before -rc1.

But if it goes through the btrfs tree, we can adjust this to use
io_should_terminate_tw() after the fact.

Reviewed-by: Jens Axboe <[email protected]>

-- 
Jens Axboe

  reply	other threads:[~2024-11-04 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 16:12 [PATCH] io_uring/cmd: let cmds to know about dying task Pavel Begunkov
2024-11-04 16:15 ` Jens Axboe [this message]
2024-11-04 16:47   ` Pavel Begunkov
2024-11-04 17:31     ` Jens Axboe
2024-11-06 19:04       ` David Sterba

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