Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 589
    • Issues 589
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 95
    • Merge requests 95
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Merge requests
  • !5620

Fix the isc_hp initialization and memory usage

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ondřej Surý requested to merge 3048-fix-isc_hp-initialization into main Dec 07, 2021
  • Overview 2
  • Commits 2
  • Pipelines 4
  • Changes 3

Previously, the isc_hp_init() could not lower the value of isc__hp_max_threads, but because of a mistake the isc__hp_max_threads would be set to HP_MAX_THREADS (e.g. 128 threads) thus it would be always set to 128. This would result in increased memory usage even when small number of workers were in use.

Change the default value of isc__hp_max_threads to be -1 (uninitialized) and require the isc_hp_init() to be called and called only once.

Additionally, enforce the max_hps value in isc_hp_new() to be smaller or equal to HP_MAX_HPS. The only user is isc_queue which uses just 1 hazard pointer, so it's only theoretical issue.

Closes #3048 (closed)

Edited Dec 08, 2021 by Ondřej Surý
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 3048-fix-isc_hp-initialization