Description:
In aoe6-70, two kernel threads, aoe_tx and aoe_ktio, handle AoE packet transmission and I/O completion respectively. Each of these threads can run on any processor.
The CPU caches should provide the most benefit when the CPU running the process that is doing the I/O is the only CPU that interacts with that data. Specifically, the skb_copy_bits function called during I/O completion would ideally be called on the CPU that will use the data.
This patch eliminates the two special purpose threads, replacing each with a work queue and a set of per-CPU queues. The schedule_work function always schedules work to run on the current CPU. Scheduling work when work is already pending is OK, because the per-CPU queues that hold the data keep track of what work really needs to be done.
Caveats:
This patch works with aoe built for 2.6.28.y kernels. It uses the for_each_cpu macro that does not exist in earlier kernels.
Testing has been minimal. On module load, the target did not fully initialize immediately, as there appeared to be I/O failures during the block layer's reading of the partition table. After that, however, I/O seemed to proceed normally.
Link:
The patch can be found here.
Tag: 70maxioc_qpcpu
This patch applies to aoe6-70, adding two module parameters, aoe_maxioc and aoe_maxtx, to cap the number of I/O completions or transmissions respectively, that the driver does before releasing the CPU and allowing the scheduler to run another process.
The "qpcpu" suffix indicates that this patch causes the driver to use a separate queue for each CPU, so that I/O completions and transmissions have CPU affinity.