Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize shared memory only when locking #1072

Merged
merged 4 commits into from
Mar 2, 2021
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Feb 21, 2021

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Instead of enlarging the shared memory objects whenever we need to do so, we enlarge them only in one central spot - that is the time of successful memory locking. This is not really a functional change, however, it makes the code more read- and understandable. Discussions in the past have shown that the current way of handling it isn't at all easy to understand. Also, this reduces the surface for possible mistakes in the future.

… are invariant inside locks.

Signed-off-by: DL6ER <dl6er@dl6er.de>
…e can iterate on when chown-ing or deleteing.

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested review from dschaper and PromoFaux March 2, 2021 04:49
@DL6ER DL6ER marked this pull request as ready for review March 2, 2021 04:49
@DL6ER DL6ER added the PR: Approval Required Open Pull Request, needs approval label Mar 2, 2021
@dschaper dschaper added PR: Approved Open Pull Request, Approved by required number of reviewers and removed PR: Approval Required Open Pull Request, needs approval labels Mar 2, 2021
@DL6ER DL6ER merged commit 2485ac9 into development Mar 2, 2021
@DL6ER DL6ER deleted the tweak/shmem_resize_in_lock branch March 2, 2021 05:00
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-8-web-v5-5-and-core-v5-3-released/46237/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement PR: Approved Open Pull Request, Approved by required number of reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants