All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Add missing flags to the uring passthrough engine
       [not found] <CGME20221011110947epcas5p2f840397a3e45e1d9326619a10d52ffa3@epcas5p2.samsung.com>
@ 2022-10-11 10:59 ` Ankit Kumar
       [not found]   ` <CGME20221011110948epcas5p1a129c0869d780bf1b236141d18e8023f@epcas5p1.samsung.com>
  2022-10-12 13:19   ` [PATCH 0/1] Add missing flags to the uring passthrough engine Jens Axboe
  0 siblings, 2 replies; 5+ messages in thread
From: Ankit Kumar @ 2022-10-11 10:59 UTC (permalink / raw)
  To: axboe; +Cc: fio, vincentfu, Ankit Kumar

Add flag IORING_SETUP_COOP_TASKRUN for ring setup, to the uring
passthrough I/O engine. This was introduced to the normal io_uring
engine with commit 4d22c103

Add flag IORING_SETUP_SINGLE_ISSUER & IORING_SETUP_DEFER_TASKRUN for
ring setup, to the uring passthrough I/O engine. This was introduced
to the normal io_uring engine with commit e453f369

Ankit Kumar (1):
  engines/io_uring: set coop taskrun, single issuer and defer taskrun

 engines/io_uring.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] engines/io_uring: set coop taskrun, single issuer and defer taskrun
       [not found]   ` <CGME20221011110948epcas5p1a129c0869d780bf1b236141d18e8023f@epcas5p1.samsung.com>
@ 2022-10-11 10:59     ` Ankit Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Ankit Kumar @ 2022-10-11 10:59 UTC (permalink / raw)
  To: axboe; +Cc: fio, vincentfu, Ankit Kumar

Add missing changes to io_uring_cmd I/O engine for COOP_TASKRUN
This was introduced for io_uring in commit 4d22c103

Add missing changes to io_uring_cmd I/O engine to set single issuer
and defer taskrun. This was introduced for io_uring in commit e453f369

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
---
 engines/io_uring.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/engines/io_uring.c b/engines/io_uring.c
index c679177f..6906e0a4 100644
--- a/engines/io_uring.c
+++ b/engines/io_uring.c
@@ -889,9 +889,30 @@ static int fio_ioring_cmd_queue_init(struct thread_data *td)
 	p.flags |= IORING_SETUP_CQSIZE;
 	p.cq_entries = depth;
 
+	/*
+	 * Setup COOP_TASKRUN as we don't need to get IPI interrupted for
+	 * completing IO operations.
+	 */
+	p.flags |= IORING_SETUP_COOP_TASKRUN;
+
+	/*
+	 * io_uring is always a single issuer, and we can defer task_work
+	 * runs until we reap events.
+	 */
+	p.flags |= IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN;
+
 retry:
 	ret = syscall(__NR_io_uring_setup, depth, &p);
 	if (ret < 0) {
+		if (errno == EINVAL && p.flags & IORING_SETUP_DEFER_TASKRUN) {
+			p.flags &= ~IORING_SETUP_DEFER_TASKRUN;
+			p.flags &= ~IORING_SETUP_SINGLE_ISSUER;
+			goto retry;
+		}
+		if (errno == EINVAL && p.flags & IORING_SETUP_COOP_TASKRUN) {
+			p.flags &= ~IORING_SETUP_COOP_TASKRUN;
+			goto retry;
+		}
 		if (errno == EINVAL && p.flags & IORING_SETUP_CQSIZE) {
 			p.flags &= ~IORING_SETUP_CQSIZE;
 			goto retry;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] Add missing flags to the uring passthrough engine
  2022-10-11 10:59 ` [PATCH 0/1] Add missing flags to the uring passthrough engine Ankit Kumar
       [not found]   ` <CGME20221011110948epcas5p1a129c0869d780bf1b236141d18e8023f@epcas5p1.samsung.com>
@ 2022-10-12 13:19   ` Jens Axboe
  2022-10-14  5:32     ` Ankit Kumar
  1 sibling, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2022-10-12 13:19 UTC (permalink / raw)
  To: Ankit Kumar; +Cc: vincentfu, fio

On Tue, 11 Oct 2022 16:29:34 +0530, Ankit Kumar wrote:
> Add flag IORING_SETUP_COOP_TASKRUN for ring setup, to the uring
> passthrough I/O engine. This was introduced to the normal io_uring
> engine with commit 4d22c103
> 
> Add flag IORING_SETUP_SINGLE_ISSUER & IORING_SETUP_DEFER_TASKRUN for
> ring setup, to the uring passthrough I/O engine. This was introduced
> to the normal io_uring engine with commit e453f369
> 
> [...]

Applied, thanks!

[1/1] engines/io_uring: set coop taskrun, single issuer and defer taskrun
      commit: 07f78c37833730594778fb5684ac6ec40d0289f8

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] Add missing flags to the uring passthrough engine
  2022-10-12 13:19   ` [PATCH 0/1] Add missing flags to the uring passthrough engine Jens Axboe
@ 2022-10-14  5:32     ` Ankit Kumar
  2022-10-14 12:13       ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Ankit Kumar @ 2022-10-14  5:32 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio, vincentfu

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

On Wed, Oct 12, 2022 at 07:19:44AM -0600, Jens Axboe wrote:
> On Tue, 11 Oct 2022 16:29:34 +0530, Ankit Kumar wrote:
> > Add flag IORING_SETUP_COOP_TASKRUN for ring setup, to the uring
> > passthrough I/O engine. This was introduced to the normal io_uring
> > engine with commit 4d22c103
> > 
> > Add flag IORING_SETUP_SINGLE_ISSUER & IORING_SETUP_DEFER_TASKRUN for
> > ring setup, to the uring passthrough I/O engine. This was introduced
> > to the normal io_uring engine with commit e453f369
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] engines/io_uring: set coop taskrun, single issuer and defer taskrun
>       commit: 07f78c37833730594778fb5684ac6ec40d0289f8
> 
> Best regards,
> -- 
> Jens Axboe

Hi Jens,

I don't see the commit in the master branch.
Can you please take a look.

Thanks and Regards
Ankit
> 
> 
> 

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/1] Add missing flags to the uring passthrough engine
  2022-10-14  5:32     ` Ankit Kumar
@ 2022-10-14 12:13       ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-10-14 12:13 UTC (permalink / raw)
  To: Ankit Kumar; +Cc: fio, vincentfu

On 10/13/22 11:32 PM, Ankit Kumar wrote:
> On Wed, Oct 12, 2022 at 07:19:44AM -0600, Jens Axboe wrote:
>> On Tue, 11 Oct 2022 16:29:34 +0530, Ankit Kumar wrote:
>>> Add flag IORING_SETUP_COOP_TASKRUN for ring setup, to the uring
>>> passthrough I/O engine. This was introduced to the normal io_uring
>>> engine with commit 4d22c103
>>>
>>> Add flag IORING_SETUP_SINGLE_ISSUER & IORING_SETUP_DEFER_TASKRUN for
>>> ring setup, to the uring passthrough I/O engine. This was introduced
>>> to the normal io_uring engine with commit e453f369
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/1] engines/io_uring: set coop taskrun, single issuer and defer taskrun
>>       commit: 07f78c37833730594778fb5684ac6ec40d0289f8
>>
>> Best regards,
>> -- 
>> Jens Axboe
> 
> Hi Jens,
> 
> I don't see the commit in the master branch.
> Can you please take a look.

Guess it might help if I actually pushed it out after committing,
that has been done now.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-14 12:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20221011110947epcas5p2f840397a3e45e1d9326619a10d52ffa3@epcas5p2.samsung.com>
2022-10-11 10:59 ` [PATCH 0/1] Add missing flags to the uring passthrough engine Ankit Kumar
     [not found]   ` <CGME20221011110948epcas5p1a129c0869d780bf1b236141d18e8023f@epcas5p1.samsung.com>
2022-10-11 10:59     ` [PATCH 1/1] engines/io_uring: set coop taskrun, single issuer and defer taskrun Ankit Kumar
2022-10-12 13:19   ` [PATCH 0/1] Add missing flags to the uring passthrough engine Jens Axboe
2022-10-14  5:32     ` Ankit Kumar
2022-10-14 12:13       ` Jens Axboe

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.