Please enable JavaScript.
Coggle requires JavaScript to display documents.
io poll for bio based block driver - Coggle Diagram
io poll for bio based block driver
idea
create per-task fifo
io_context
append pull context for saving one allocation
sync poll optimization
pass data to poll directly
not necessary
current->ioc is fast enough
drain fifio before exit task
or simply poll all queues
return submission task's pid or task_struct
change cookie format
running out of fifo
fallback to poll all queues
poll task needs one per-task data too
for storing the data moved from submission task
replace kfifo with bio group list
implementation
cleanup cookie returned from submit_bio
not doable
support poll on all hw queues first
clear HIPRI in case of bio_split
kfifo with one lock
multile poll context
shared ioc
add CONTEXT_HIPRI
depends on poll queue
how to differentiate pid and bad token
understand pid
pid 0: swapper
issues
will ioc be shared by more than task?
CLONE_IO
check ioc->nr_tasks
add lock in case of shared ioc
atomic setup poll_queue
offload IO submission
idea way is to clear HIPRI
how to do that?
how to recoganize if bio is orignated from DM
excluse standalone bio
mark it as LIMITD_HIPRI
multiple FDs in single submission task
track bios originated from this bio
coner cases
io_context isn't allocated when submitting one hipri bio, but later it is created
no problem
that will be a new bio
submission context exits, but some bios not got polled
submisson context is allocated, but poll context isn't allocated
nvme multipath
bio is requeued
looks good
design
per-task queues
per-task submission queue
store submission result
sumission task pid is passed to poll task via cookie
per-task poll queue
move submission result from sumission queue to poll queue
always poll from the local poll queue
when to clear data when dm bio completes?
check bio completed?
one bio may be completed from another poll context
sinlge poll queue, multiple io_uring task
one poll is good, another is blind poll
poll for submission from multiple tasks?
save tid in the data
context analysis
1:1
submission and poll share same context
submission/poll are done on two context
N:1
multiple submission contexts
single poll context
deal with offload bio submission
REQ_HIPRI_CONTEXT
end polled bio in blk_bio_poll() explicitly
test
performance isn't good
investigation
set spin as zero
observe that how many cookies queued usually
knowledge to read
process exit
how io_uring handles exit
io_uring's polling
observe on real hw
test nvme multipath