Purging the Cache
The cache can be purged of a specific job by writing the JobID to the jobid_name proc file. Any items in the cache that are more than 300 seconds old will also be purged at this time.
Lifecycle of a mapping
A new mapping is created when a lookup is performed, and there is no map in the cache. At this time, the JobID is determined
Each time the map is accessed, it is checked to see if it needs to be refreshed (every 30 seconds). The timer is then reset to the current time. Each map has its own timer.
During a purge, if the JobID matches the item to be purged, or if the timer is more than 300 seconds.
Determining JobID
The JobID will be determined as follows:
1) The jobid_var proc variable, which can be “procname_uid”, or the name of a variable in the application’s environment, typically the environment variable containing the job name assigned by the scheduler
2) If 1 is not available, defaulting to the “procname_uid” scheme.
3) All Lustre threads are filtered out
4) If none are available, the JobID stored in the inode is used
5) If there is no JobID stored in the inode, it will remain blank.
This is a change from the current method which simply returns an empty JobID if nothing is available from the environment. The reason for doing this is to identify processes (and users) running on a node that is not scheduled, or are taking up significant resources, and provide read-ahead accounting properly.
Also, there should be some documentation added for patch https://review.whamcloud.com/31691 "
LU-10698obdclass: allow specifying complex jobids". The commit comment is pretty reasonable: