* [PULL for-9.0 0/1] Block patches
@ 2024-03-21 17:22 Stefan Hajnoczi
2024-03-21 17:22 ` [PULL for-9.0 1/1] coroutine: reserve 5,000 mappings Stefan Hajnoczi
2024-03-22 12:58 ` [PULL for-9.0 0/1] Block patches Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2024-03-21 17:22 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Hanna Reitz, qemu-block,
Michael S. Tsirkin, Stefan Hajnoczi
The following changes since commit fea445e8fe9acea4f775a832815ee22bdf2b0222:
Merge tag 'pull-maintainer-final-for-real-this-time-200324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-21 10:31:56 +0000)
are available in the Git repository at:
https://gitlab.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 9352f80cd926fe2dde7c89b93ee33bb0356ff40e:
coroutine: reserve 5,000 mappings (2024-03-21 13:14:30 -0400)
----------------------------------------------------------------
Pull request
I was too quick in sending the coroutine pool sizing change for -rc0 and still
needed to address feedback from Daniel Berrangé.
----------------------------------------------------------------
Stefan Hajnoczi (1):
coroutine: reserve 5,000 mappings
util/qemu-coroutine.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--
2.44.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PULL for-9.0 1/1] coroutine: reserve 5,000 mappings
2024-03-21 17:22 [PULL for-9.0 0/1] Block patches Stefan Hajnoczi
@ 2024-03-21 17:22 ` Stefan Hajnoczi
2024-03-22 12:58 ` [PULL for-9.0 0/1] Block patches Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2024-03-21 17:22 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Peter Maydell, Hanna Reitz, qemu-block,
Michael S. Tsirkin, Stefan Hajnoczi, Daniel P . Berrangé
Daniel P. Berrangé <berrange@redhat.com> pointed out that the coroutine
pool size heuristic is very conservative. Instead of halving
max_map_count, he suggested reserving 5,000 mappings for non-coroutine
users based on observations of guests he has access to.
Fixes: 86a637e48104 ("coroutine: cap per-thread local pool size")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20240320181232.1464819-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
util/qemu-coroutine.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c
index 2790959eaf..eb4eebefdf 100644
--- a/util/qemu-coroutine.c
+++ b/util/qemu-coroutine.c
@@ -377,12 +377,17 @@ static unsigned int get_global_pool_hard_max_size(void)
NULL) &&
qemu_strtoi(contents, NULL, 10, &max_map_count) == 0) {
/*
- * This is a conservative upper bound that avoids exceeding
- * max_map_count. Leave half for non-coroutine users like library
- * dependencies, vhost-user, etc. Each coroutine takes up 2 VMAs so
- * halve the amount again.
+ * This is an upper bound that avoids exceeding max_map_count. Leave a
+ * fixed amount for non-coroutine users like library dependencies,
+ * vhost-user, etc. Each coroutine takes up 2 VMAs so halve the
+ * remaining amount.
*/
- return max_map_count / 4;
+ if (max_map_count > 5000) {
+ return (max_map_count - 5000) / 2;
+ } else {
+ /* Disable the global pool but threads still have local pools */
+ return 0;
+ }
}
#endif
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PULL for-9.0 0/1] Block patches
2024-03-21 17:22 [PULL for-9.0 0/1] Block patches Stefan Hajnoczi
2024-03-21 17:22 ` [PULL for-9.0 1/1] coroutine: reserve 5,000 mappings Stefan Hajnoczi
@ 2024-03-22 12:58 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2024-03-22 12:58 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: qemu-devel, Kevin Wolf, Hanna Reitz, qemu-block,
Michael S. Tsirkin
On Thu, 21 Mar 2024 at 17:23, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit fea445e8fe9acea4f775a832815ee22bdf2b0222:
>
> Merge tag 'pull-maintainer-final-for-real-this-time-200324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-21 10:31:56 +0000)
>
> are available in the Git repository at:
>
> https://gitlab.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 9352f80cd926fe2dde7c89b93ee33bb0356ff40e:
>
> coroutine: reserve 5,000 mappings (2024-03-21 13:14:30 -0400)
>
> ----------------------------------------------------------------
> Pull request
>
> I was too quick in sending the coroutine pool sizing change for -rc0 and still
> needed to address feedback from Daniel Berrangé.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-22 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 17:22 [PULL for-9.0 0/1] Block patches Stefan Hajnoczi
2024-03-21 17:22 ` [PULL for-9.0 1/1] coroutine: reserve 5,000 mappings Stefan Hajnoczi
2024-03-22 12:58 ` [PULL for-9.0 0/1] Block patches Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).