You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request focuses on enhancing the performance of memory-mapped file operations within the buffer_object component. By leveraging the madvise system call, the changes provide crucial hints to the kernel regarding anticipated memory access patterns and preferences for huge pages. This optimization is expected to lead to more efficient memory management, reduced latency, and improved overall throughput for applications utilizing these memory-mapped files.
Highlights
Performance Optimization: Introduced madvise system calls after mmap operations to provide kernel memory hints, aiming to improve performance for memory-mapped files.
Kernel Memory Hints: Specifically used MADV_WILLNEED to suggest that memory regions will be accessed soon, allowing the kernel to prefetch pages, and MADV_HUGEPAGE to encourage the use of huge pages, which can reduce TLB misses and enhance throughput.
Applicability: The madvise calls were added to both create_file_and_mmap (for read/write access) and open_file_and_mmap_ro (for read-only access) functions, ensuring performance benefits across different file access patterns.
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.
Added madvise(ptr, size, MADV_WILLNEED | MADV_HUGEPAGE); after the mmap call in create_file_and_mmap to provide kernel memory hints for newly created and mapped files.
Added madvise(ptr, size, MADV_WILLNEED | MADV_HUGEPAGE); after the mmap call in open_file_and_mmap_ro to provide kernel memory hints for existing read-only mapped files.
Corrected a minor formatting issue by ensuring a newline at the end of the file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.