Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • tools
  • testing
  • kunit
  • kunit_tool_test.py
Find file BlameHistoryPermalink
  • David Gow's avatar
    kunit: tool: Default --jobs to number of CPUs · ad659ccb
    David Gow authored Dec 15, 2021
    
    
    The --jobs parameter for kunit_tool currently defaults to 8 CPUs,
    regardless of the number available. For systems with significantly more
    (or less), this is not as efficient. Instead, default --jobs to the
    number of CPUs available to the process: while there are as many
    superstitions as to exactly what the ideal jobs:CPU ratio is, this seems
    sufficiently sensible to me.
    
    A new helper function to get the default number of jobs is added:
    get_default_jobs() -- this is used in kunit_tool_test instead of a
    hardcoded value, or an explicit call to len(os.sched_getaffinity()), so
    should be more flexible if this needs to change in the future.
    
    Signed-off-by: default avatarDavid Gow <davidgow@google.com>
    Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
    Reviewed-by: default avatarDaniel Latypov <dlatypov@google.com>
    Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
    Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
    ad659ccb
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7