Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4186

Change lustre_get_jobid to read from proc file and cache it in lu_env

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • None
    • 11326

    Description

      lustre_get_jobid is calling cfs_access_process_vm() that is a core mm function. In upstream kernel client, we changed it to read jobid variable from /proc/self/environ file and cache it in lu_env so that we can remove cfs_access_process_vm().

      Currently, jobid is cached at vvp layer and is only accessible by llite. One possible optimization is to add a new lu_context_key at obdclass layer to cache jobid. And then change lustre_get_jobid() to handle the caching logic. For every thread, it only read proc environ file once and cache the results forever. Callers just call lustre_get_jobid() and use the result thereafter.

      The ticket is created to back port related upstream kernel patches and also initiate the discussion about whether it is good to cache jobid in lu_env at obdclass layer.

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              bergwolf Peng Tao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: