bdev: explicitly mark _spdk_bdev_io_submit as inline
This function gets used as a function pointer, which seems to keep the compiler from trying to inline the function. Stack manipulation was showing up in the perf profile pointing to this. Marking the function as inline gets it actually inlined in the hot I/O path. Improves bdevperf microbenchmark from 78M to 85M IO/s. Cores are virtually identical - 11.4M on core 0 and 10.4-10.6M on remaining cores. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iadced071dfc07fc09db6da3571c930988b2dc3fd Reviewed-on: https://review.gerrithub.io/c/443278 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
ab0a454dc6
commit
ff182630dc
@ -1638,7 +1638,10 @@ _spdk_bdev_io_split(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
||||
_spdk_bdev_io_split_with_payload(bdev_io);
|
||||
}
|
||||
|
||||
static void
|
||||
/* Explicitly mark this inline, since it's used as a function pointer and otherwise won't
|
||||
* be inlined, at least on some compilers.
|
||||
*/
|
||||
static inline void
|
||||
_spdk_bdev_io_submit(void *ctx)
|
||||
{
|
||||
struct spdk_bdev_io *bdev_io = ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user