ce70f29662
As of glibc version 2.3.4 onwards getpid() is no longer cached. SPDK makes calls to it in nvme_allocate_request() which is called for each nvme request received. This results in a system calls up to millions of times per second which slows down nvme submissions. Since the pid never changes, it only needs to be called once in initialization per process. This improves the performance of nvme_allocate_request() signficantly. Change-Id: Idee0f06484d459906b9ce1d9b7360a33119c7e56 Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com> Signed-off-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Reviewed-on: https://review.gerrithub.io/407599 Reviewed-by: Scott Branden <sbranden@gmail.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>