Skip to contentSkip to conversation

io_uring SQPOLL sharing changes

ANNOUNCEMENT Pavel Begunkov 5 participants 6 messages Mar 19, 2021 – Mar 24, 2021 io_uring

lore
Share & tools
lore
#0 lore raw

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Just FYI, but may also yield some discussion on the topic.

Signature · 1 line
Pavel Begunkov
#1 lore raw

hi Pavel,

Quoted 6 lines

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Thanks for your kindly reminder, currently we only share sqpoll thread in threads belonging to one same process.

Regards,
Xiaoguang Wang

Quoted 3 lines

Just FYI, but may also yield some discussion on the topic.

maintainer
#2 lore raw
Quoted 11 lines · Xiaoguang Wang

hi Pavel,

Quoted 6 lines

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Thanks for your kindly reminder, currently we only share sqpoll thread in threads belonging to one same process.

That's good to know, imho it is also the only thing that _really_ makes sense to do.

Since we're on the topic, are you actively using the percpu thread setup that you sent out patches for earlier? That could still work within the new scheme of having io threads, but I'd be curious to know first if you guys are actually using it.

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 13 lines · Jens Axboe
Quoted 11 lines · Xiaoguang Wang

hi Pavel,

Quoted 6 lines

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Thanks for your kindly reminder, currently we only share sqpoll thread in threads belonging to one same process.

Quoted 8 lines

That's good to know, imho it is also the only thing that _really_ makes sense to do.

Since we're on the topic, are you actively using the percpu thread setup that you sent out patches for earlier? That could still work within the new scheme of having io threads, but I'd be curious to know first if you guys are actually using it.

Yes, we've already used percpu sqthread feature in our production environment, in which 16 application threads share the same sqthread, and it gains ~20% rt improvement compared with libaio.

Thanks,
Joseph

maintainer
#4 lore raw
Quoted 25 lines · Joseph Qi
Quoted 13 lines · Jens Axboe
Quoted 11 lines · Xiaoguang Wang

hi Pavel,

Quoted 6 lines

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Thanks for your kindly reminder, currently we only share sqpoll thread in threads belonging to one same process.

Quoted 8 lines

That's good to know, imho it is also the only thing that _really_ makes sense to do.

Since we're on the topic, are you actively using the percpu thread setup that you sent out patches for earlier? That could still work within the new scheme of having io threads, but I'd be curious to know first if you guys are actually using it.

Quoted 3 lines

Yes, we've already used percpu sqthread feature in our production environment, in which 16 application threads share the same sqthread, and it gains ~20% rt improvement compared with libaio.

Great! Any chance I can get you to re-post the patches against the current tree?

Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 26 lines · Jens Axboe
Quoted 25 lines · Joseph Qi
Quoted 21 lines · Jens Axboe
Quoted 11 lines · Xiaoguang Wang

hi Pavel,

Quoted 6 lines

Hey,

You may have already noticed, but there will be a change how SQPOLL is shared in 5.12. In particular, SQPOLL may be shared only by processes belonging to the same thread group. If this condition is not fulfilled, then it silently creates a new SQPOLL task.

Thanks for your kindly reminder, currently we only share sqpoll thread in threads belonging to one same process.

That's good to know, imho it is also the only thing that _really_ makes sense to do.

Since we're on the topic, are you actively using the percpu thread setup that you sent out patches for earlier? That could still work within the new scheme of having io threads, but I'd be curious to know first if you guys are actually using it.

Quoted 7 lines
Quoted 3 lines

Yes, we've already used percpu sqthread feature in our production environment, in which 16 application threads share the same sqthread, and it gains ~20% rt improvement compared with libaio.

Great! Any chance I can get you to re-post the patches against the current tree?

Yes, we'll do it later.

Thanks,
Joseph