[SPDK] Sanity check on execution model

nufosmatic at nufosmatic.com Mon, 15 Mar 2021 21:45:08 +0000
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
I am having a terrible time getting my head wrapped around the execution model. Probably the biggest problem is I started life showing flight simulator customers how to use interrupts instead of polling (because I worked for a company that did interrupts very, VERY well). This polling executive is completely old-fashioned how they did it before interrupts and multi-processors kinda stuff. But, the basic benchmarks don't lie - I'm seeing about a 20% plus-up in performance using SPDK over kernel drivers, so I've got to just deal with it and get with the program.

So I finally re-arranged hello_world_bdev using a state machine maintained in a Poller, where hello_write and hello_read are called when the right state is met and the callbacks handle the asynchrony and update the state. This seems like a good model moving forward, where as I scale from the single-channel prototype to a multi-channel reality, and the number of cores I have available does not exceed the number of channels in my application.

Is this a sensible use of a Poller?