LU-7195 jobstats: Allow setting static content for jobid_var
When enabling jobstats a ten percent performance was observed
when running any job. This was due to the expense of the kernel
acquiring the process environment state. Create a alternative
way to setting jobid_var besides meddling directly in process
environment variables (which is also not possible on certain
platforms due to not exported symbols), create jobid_name
proc file to represent this info (to be filled by job scheduler
epilogue). Is this based on the upstream commit
Linux-commit :
76133e66b1417a73c0950d0716219d09ee21d595
except it doesn't remove the process environment probing to
allow backwards compatiblity. This patch doesn't notify the
admins that using old jobstat proc method has a heavy cost.
Change-Id: If81733e549222a7ab31b24673f0e9b8401541130
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
CC: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: http://review.whamcloud.com/16598
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>