public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCHSET v2 0/4] Add support for shared io-wq backends
@ 2020-01-24 21:31 Jens Axboe
  2020-01-24 21:31 ` [PATCH 1/4] io-wq: make the io_wq ref counted Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jens Axboe @ 2020-01-24 21:31 UTC (permalink / raw)
  To: io-uring

Here's v2 of the shared wq backend patchset. A few minor changes in terms
of id validation, and a switch to using idr and also utilizing it for
lookups.

Changes since v1:

- Use idr instead of ida, and use it for lookups too
- Rename IORING_SETUP_SHARED to IORING_SETUP_ATTACH_WQ
- Don't allow id specified without IORING_SETUP_ATTACH_WQ
- Use id=0 if we run out of idr space instead of failing
- id==0 is not allowed for attach

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCHSET 0/4] Add support for shared io-wq backends
@ 2020-01-23 23:16 Jens Axboe
  2020-01-23 23:16 ` [PATCH 2/4] io-wq: add 'id' to io_wq Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2020-01-23 23:16 UTC (permalink / raw)
  To: io-uring

Sometimes an applications wants to use multiple smaller rings, because
it's more efficient than sharing a ring. The downside of that is that
we'll create the io-wq backend separately for all of them, while they
would be perfectly happy just sharing that.

This patchset adds support for that. io_uring_params grows an 'id' field,
which denotes an identifier for the async backend. If an application
wants to utilize sharing, it'll simply grab the id from the first ring
created, and pass it in to the next one and set IORING_SETUP_SHARED. This
allows efficient sharing of backend resources, while allowing multiple
rings in the application or library.

Not a huge fan of the IORING_SETUP_SHARED name, we should probably make
that better (I'm taking suggestions).

-- 
Jens Axboe



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

end of thread, other threads:[~2020-01-25 16:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-24 21:31 [PATCHSET v2 0/4] Add support for shared io-wq backends Jens Axboe
2020-01-24 21:31 ` [PATCH 1/4] io-wq: make the io_wq ref counted Jens Axboe
2020-01-24 21:31 ` [PATCH 2/4] io-wq: add 'id' to io_wq Jens Axboe
2020-01-24 21:31 ` [PATCH 3/4] io-wq: allow lookup of existing io_wq with given id Jens Axboe
2020-01-24 21:31 ` [PATCH 4/4] io_uring: add support for sharing kernel io-wq workqueue Jens Axboe
2020-01-25  7:45   ` Stefan Metzmacher
2020-01-25 16:44     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2020-01-23 23:16 [PATCHSET 0/4] Add support for shared io-wq backends Jens Axboe
2020-01-23 23:16 ` [PATCH 2/4] io-wq: add 'id' to io_wq Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox