Skip to content

gh-113861: Skip the full sync for file-backed mmap on macOS - #162357

Open
maurycy wants to merge 4 commits into
python:mainfrom
maurycy:mmap-fullfsync
Open

maurycy wants to merge 4 commits into
python:mainfrom
maurycy:mmap-fullfsync

Conversation

@maurycy

@maurycy maurycy commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Remove the F_FULLFSYNC call from mmap.mmap() on macOS. It holds the GIL on every file-backed mapping to work around an HFS+ crash specific to 32-bit kernels (#55486).

On an arm64 Mac with APFS, the time to create and close a 1 MiB read-only mapping falls from 4.16 ms to 5.58 µs.

@maurycy
maurycy requested a review from AA-Turner as a code owner November 21, 2026 05:56
@maurycy

maurycy commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

@maurycy maurycy changed the title gh-162356: Skip the full sync for file-backed mmap on macOS gh-162356: Skip the full sync for file-backed mmap on macOS Nov 21, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36061696 | 📁 Comparing 80daaed against main (e8fb673)

  🔍 Preview build  

3 files changed
± library/mmap.html
± whatsnew/3.16.html
± whatsnew/changelog.html

@maurycy maurycy changed the title gh-162356: Skip the full sync for file-backed mmap on macOS gh-113861: Skip the full sync for file-backed mmap on macOS Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant