Skip to content

bpo-37257: obmalloc: stop simple arena thrashing#14039

Merged
tim-one merged 4 commits intopython:masterfrom
tim-one:obmalloc-arena-thrash
Jun 13, 2019
Merged

bpo-37257: obmalloc: stop simple arena thrashing#14039
tim-one merged 4 commits intopython:masterfrom
tim-one:obmalloc-arena-thrash

Conversation

@tim-one
Copy link
Copy Markdown
Member

@tim-one tim-one commented Jun 13, 2019

bpo-37257: obmalloc: stop simple arena thrashing

https://bugs.python.org/issue37257

@tim-one tim-one changed the title first tab - and, with luck, the last ;-) bpo-37257: obmalloc: stop simple arena thrashing Jun 13, 2019
@tim-one tim-one assigned tim-one, methane and nascheme and unassigned methane and nascheme Jun 13, 2019
@tim-one tim-one requested review from methane and nascheme June 13, 2019 02:53
Comment thread Objects/obmalloc.c Outdated
Comment thread Objects/obmalloc.c Outdated
@methane
Copy link
Copy Markdown
Member

methane commented Jun 13, 2019

LGTM except two nitpicks.

tim-one and others added 2 commits June 12, 2019 22:12
Co-Authored-By: Inada Naoki <[email protected]>
Co-Authored-By: Inada Naoki <[email protected]>
@tim-one tim-one removed the request for review from nascheme June 13, 2019 03:33
@tim-one tim-one merged commit d1c85a2 into python:master Jun 13, 2019
@bedevere-bot
Copy link
Copy Markdown

@tim-one: Please replace # with GH- in the commit message next time. Thanks!

@tim-one tim-one deleted the obmalloc-arena-thrash branch June 13, 2019 03:41
nascheme pushed a commit to nascheme/cpython that referenced this pull request Jun 21, 2019
pythonGH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.
nascheme pushed a commit to nascheme/cpython that referenced this pull request Jun 21, 2019
pythonGH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
pythonGH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
pythonGH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants