coroutine: mmap stack memory and stack size
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest7 patches 7 repliesIn review
- v86 patches 4 repliesSuperseded
- v76 patches 3 repliesApplied
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 6 patches | 2 replies | Superseded | |
| v5 posting 2/2 | 6 patches | 0 replies | Superseded | |
| v5 posting 1/2 | 6 patches | 12 replies | Applied | |
| v4 | 6 patches | 5 replies | Superseded | |
| v3 | 6 patches | 0 replies | Superseded | |
| v2 | 6 patches | 4 replies | Superseded | |
| v1 | 6 patches | 16 replies | Superseded |
Changes in v9 from the cover letter
- Patch 1: return size of stack including guard page [Kevin]
- Patch 2: added to rename coroutine sigaltstack strucht [Kevin]
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | oslib-posix: add helpers for stack alloc and freeinclude/ util/ | +69 | 2 replies | |
| 2/7 | coroutine-sigaltstack: rename coroutine struct appropriatelyutil/ | +8 | 1 reply | |
| 3/7 | coroutine: add a macro for the coroutine stack sizeinclude/ util/ util/ +1 more | +5 | 0 replies | |
| 4/7 | coroutine-ucontext: use helper for allocating stack memoryutil/ | +6 | 1 reply | |
| 5/7 | coroutine-sigaltstack: use helper for allocating stack memoryutil/ | +5 | 1 reply | |
| 6/7 | oslib-posix: add a configure switch to debug stack usageconfigure util/ | +54 | 1 reply | |
| 7/7 | coroutine: reduce stack size to 60kBinclude/ | +1 | 1 reply |
Reviews trailers per patch
6 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Paolo Bonzini | Richard Henderson | Eric Blake |
|---|---|---|---|
| 1/7 | |||
| 2/7 | R-b | ||
| 3/7 | R-b | R-b | |
| 4/7 | R-b | ||
| 5/7 | R-b | ||
| 6/7 | R-b | ||
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [Qemu-devel] [PATCH V9 0/7] coroutine: mmap stack memory and stack size
I decided to split this from the rest of the Qemu RSS usage series as it contains the more or less non contentious patches.
I omitted the MAP_GROWSDOWN flag in mmap as we are not 100% sure which side effects it has.
I kept the guard page which is now nicely makes the stacks visible in smaps. The old version of the relevent patch lacked the MAP_FIXED flag in the second call to mmap.
v8->v9:
- Patch 1: return size of stack including guard page [Kevin]
- Patch 2: added to rename coroutine sigaltstack strucht [Kevin]
v7->v8:
The series failed on platforms with 64kB page size. Thus the following changes where made:
- Patch 1: add the guard page to the stack memory and do not deduct it [Kevin, Stephan]
- Patch 1: Submit the requested page size as a pointer so that qemu_alloc_stack can adjust the size according to system requirements and that the full size is usable to the caller.
- Patch 6: reduced stack size to 60kB so that on systems with 4kB page size we still get 64kB allocations.
v6->v7:
- Patch 1: avoid multiple calls to sysconf and getpagesize [Richard]
v5->v6:
- Patch 1: added info that the guard page is deducted from stack memory to commit msg and headers [Stefan]
- rebased to master
v4->v5:
- Patch 1: check if _SC_THREAD_STACK_MIN is defined
- Patch 1: guard against sysconf(_SC_THREAD_STACK_MIN) returning -1 [Eric]
v3->v4:
- Patch 1: add a static function to adjust the stack size [Richard]
- Patch 1: round up the stack size to multiple of the pagesize.
v2->v3:
- Patch 1,6: adjusted commit message to mention the guard page [Markus]
v1->v2:
- Patch 1: added an architecture dependend guard page [Richard]
- Patch 1: avoid stacks smaller than _SC_THREAD_STACK_MIN [Richard]
- Patch 1: use mmap+mprotect instead of mmap+mmap [Richard]
- Patch 5: u_int32_t -> uint32_t [Richard]
- Patch 5: only available if stack grows down
Peter Lieven (7):
oslib-posix: add helpers for stack alloc and free
coroutine-sigaltstack: rename coroutine struct appropriately
coroutine: add a macro for the coroutine stack size
coroutine-ucontext: use helper for allocating stack memory
coroutine-sigaltstack: use helper for allocating stack memory
oslib-posix: add a configure switch to debug stack usage
coroutine: reduce stack size to 60kB
configure | 19 +++++++++++ include/qemu/coroutine_int.h | 2 ++ include/sysemu/os-posix.h | 27 ++++++++++++++++ util/coroutine-sigaltstack.c | 25 +++++++------- util/coroutine-ucontext.c | 11 ++++--- util/coroutine-win32.c | 2 +- util/oslib-posix.c | 77 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 145 insertions(+), 18 deletions(-)
Signature · 1 line
1.9.1