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 598
    • Issues 598
    • 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
  • !7410

Draft: Reduce the RBTDB nodelock contention in rdataset_getownercase() and decrement_reference()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Ondřej Surý requested to merge 3811-lock-contention-in-the-rbtdb into main Jan 19, 2023
  • Overview 3
  • Commits 16
  • Pipelines 5
  • Changes 7

Create a local copy of header->upper, so we can unlock the node when doing dns_name 0x20 manipulation. This shortens the time the read lock on the nodelock is held, reducing the lock contention between threads.

The detachnode() and decrement_reference() would always lock the nodelock even in cases where the node reference would be greater than 1, so no action would be taken. By reordering the contents of decrement_reference() and changing the meaning of its return value by incorporating the checks from detachnode(), we can avoid the locking when the node is referenced by more than one user.

Closes #3811

Edited Jan 19, 2023 by Ondřej Surý
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 3811-lock-contention-in-the-rbtdb