numam-spdk/lib/blobfs
Changpeng Liu beaf69617a blobfs: try to free a valid file cache buffer when allocating new caches
When allocating a new cache buffer, we will pick up a file and try to
free cache buffers with this file, but sometimes the file lock maybe
hold by other thread, so we use pthread_spin_trylock() here, when
pthread_spin_trylock() return a negative value, we will break the
loop, this is not efficient as the orginal logic, which may result
cache buffer allocation failure, so we will break the loop only when
there is a valid cache free.

Change-Id: I7be2fddb33c38dba466c2fcc2584ccf7ac16ea7a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/950
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-21 01:28:43 +00:00
..
blobfs.c blobfs: try to free a valid file cache buffer when allocating new caches 2020-02-21 01:28:43 +00:00
Makefile blobfs: Add a lightweight filesystem built on the blobstore 2017-03-24 14:15:45 -07:00
tree.c blobfs: make internal asynchronous APIs as public APIs 2019-06-28 09:50:50 +00:00
tree.h blobfs: Add conf parse for blobfs. 2017-11-15 18:03:00 -05:00