IO-Uring Archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christian Heusel <christian@heusel.eu>
Cc: Andrew Udvare <audvare@gmail.com>,
	regressions@lists.linux.dev, io-uring <io-uring@vger.kernel.org>
Subject: Re: [REGRESSION] ETXTBSY when running Yarn (Node) since af5d68f
Date: Tue, 21 May 2024 12:29:41 -0600	[thread overview]
Message-ID: <0ec1d936-ee3f-4df2-84df-51c15830091b@kernel.dk> (raw)
In-Reply-To: <b8018270-6e9a-4888-87fd-69620d62c4e5@kernel.dk>

On 5/21/24 12:25 PM, Jens Axboe wrote:
> Outside of that, only other thing I can think of is that the final
> close would be punted to task_work by fput(), which means there's also
> a dependency on the task having run its kernel task_work before it's
> fully closed.

Yep I think that's it, the below should fix it.


diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 554c7212aa46..68a3e3290411 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -241,6 +241,8 @@ static unsigned int io_sq_tw(struct llist_node **retry_list, int max_entries)
 			return count;
 		max_entries -= count;
 	}
+	if (task_work_pending(current))
+		task_work_run();
 
 	*retry_list = tctx_task_work_run(tctx, max_entries, &count);
 	return count;

-- 
Jens Axboe


  reply	other threads:[~2024-05-21 18:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <313824bc-799d-414f-96b7-e6de57c7e21d@gmail.com>
2024-05-21 16:16 ` [REGRESSION] ETXTBSY when running Yarn (Node) since af5d68f Jens Axboe
2024-05-21 16:22   ` Jens Axboe
2024-05-21 18:17     ` Christian Heusel
2024-05-21 18:25       ` Jens Axboe
2024-05-21 18:29         ` Jens Axboe [this message]
2024-05-21 19:05           ` Jens Axboe
2024-05-21 19:07           ` Christian Heusel
2024-05-21 19:11             ` Jens Axboe
2024-05-21 19:30           ` Andrew Udvare
2024-05-21 19:32             ` Jens Axboe
2024-05-21 19:33           ` Andrew Udvare
2024-05-21 19:36             ` Jens Axboe

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=0ec1d936-ee3f-4df2-84df-51c15830091b@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=audvare@gmail.com \
    --cc=christian@heusel.eu \
    --cc=io-uring@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).