+6
−4
Loading
Bounce buffers are big structures, they only used
when accel module doesn't support memory domains.
But each task initializes orig_iovs of source and
destination bounce buffers, accel sequence check
these pointers for NULL. As result, we access 2
cache lines just to check these pointers.
Instead, since function accel_set_bounce_buffer sets
task iovs to point to boucne iovs, we rework
check and avoid loading bounce buffers into cache
until they really needed.
Original version (x86, --disable-debug) produces
a bit more efficient asm code, but as noted above,
we can save 2 cache lines per sequence
if (task->bounce.s.orig_iovs != NULL) {
48 83 bb 18 01 00 00 cmpq $0x0,0x118(%rbx)
if (task->s.iovs == &task->bounce.s.iov) {
48 8d 83 38 01 00 00 lea 0x138(%rbx),%rax
48 39 43 50 cmp %rax,0x50(%rbx)
Signed-off-by:
Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Iae7582979548edc7a6045daa122b9c7ee4bd878e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19038
Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>