Whamcloud - gitweb
LU-8926 llite: reduce jobstats race window
In the current code, lli_jobid is set to zero on every call
to lustre_get_jobid. This causes problems, because it's
used asynchronously to set the job id in RPCs, and some
RPCs will falsely get no jobid set. (For small IO sizes,
this can be up to 60% of RPCs.)
It would be very expensive to put hard synchronization
between this and every outbound RPC, and it's OK to very
rarely get an RPC without correct job stats info.
This patch only updates the lli_jobid when the job id has
changed, which leaves only a very small window for reading
an inconsistent job id.
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I6c3a7f8683dc5f5d467940920938db18b0c20462
Reviewed-on: https://review.whamcloud.com/24253
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>