sock/uring: enable pipe buffer on arm64

The pipe buffer has obvious performance influence on arm64. The
following is my test result with 1core, we can also enable it
on arm64 currently like the posix socket. And later we can find
the optimal pipe size that won't cause a degradation for large
payloads.
           randwrite  randread
512 byte     61%       97%
4096 byte    84%       16%
16384 byte   -13%     -17%

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ib4df60751c5e06ef9bd7fc7bb7efafa5ad4de211
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3329
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Richael Zhuang 2020-07-14 17:14:49 +08:00 committed by Tomasz Zawadzki
parent 92f29271d5
commit 612aa86b50

View File

@ -286,15 +286,12 @@ uring_sock_set_recvbuf(struct spdk_sock *_sock, int sz)
assert(sock != NULL);
#ifndef __aarch64__
/* On ARM systems, this buffering does not help. Skip it. */
/* The size of the pipe is purely derived from benchmarks. It seems to work well. */
rc = uring_sock_alloc_pipe(sock, sz);
if (rc) {
SPDK_ERRLOG("unable to allocate sufficient recvbuf with sz=%d on sock=%p\n", sz, _sock);
return rc;
}
#endif
if (sz < SO_RCVBUF_SIZE) {
sz = SO_RCVBUF_SIZE;