1 | The following changes since commit ac5f7bf8e208cd7893dbb1a9520559e569a4677c: | 1 | The following changes since commit fea445e8fe9acea4f775a832815ee22bdf2b0222: |
---|---|---|---|
2 | 2 | ||
3 | Merge tag 'migration-20230424-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-04-24 15:00:39 +0100) | 3 | 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) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 9d672e290475001fcecdcc9dc79ad088ff89d17f: | 9 | for you to fetch changes up to 9352f80cd926fe2dde7c89b93ee33bb0356ff40e: |
10 | 10 | ||
11 | tracetool: use relative paths for '#line' preprocessor directives (2023-04-24 13:53:44 -0400) | 11 | coroutine: reserve 5,000 mappings (2024-03-21 13:14:30 -0400) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Pull request (v2) | 14 | Pull request |
15 | 15 | ||
16 | I dropped the zoned storage patches that had CI failures. This pull request | 16 | I was too quick in sending the coroutine pool sizing change for -rc0 and still |
17 | only contains fixes now. | 17 | needed to address feedback from Daniel Berrangé. |
18 | 18 | ||
19 | ---------------------------------------------------------------- | 19 | ---------------------------------------------------------------- |
20 | 20 | ||
21 | Philippe Mathieu-Daudé (1): | 21 | Stefan Hajnoczi (1): |
22 | block/dmg: Declare a type definition for DMG uncompress function | 22 | coroutine: reserve 5,000 mappings |
23 | 23 | ||
24 | Thomas De Schampheleire (1): | 24 | util/qemu-coroutine.c | 15 ++++++++++----- |
25 | tracetool: use relative paths for '#line' preprocessor directives | 25 | 1 file changed, 10 insertions(+), 5 deletions(-) |
26 | |||
27 | block/dmg.h | 8 ++++---- | ||
28 | block/dmg.c | 7 ++----- | ||
29 | scripts/tracetool/backend/ftrace.py | 4 +++- | ||
30 | scripts/tracetool/backend/log.py | 4 +++- | ||
31 | scripts/tracetool/backend/syslog.py | 4 +++- | ||
32 | 5 files changed, 15 insertions(+), 12 deletions(-) | ||
33 | 26 | ||
34 | -- | 27 | -- |
35 | 2.39.2 | 28 | 2.44.0 |
36 | 29 | ||
37 | 30 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <philmd@linaro.org> | 1 | Daniel P. Berrangé <berrange@redhat.com> pointed out that the coroutine |
---|---|---|---|
2 | pool size heuristic is very conservative. Instead of halving | ||
3 | max_map_count, he suggested reserving 5,000 mappings for non-coroutine | ||
4 | users based on observations of guests he has access to. | ||
2 | 5 | ||
3 | Introduce the BdrvDmgUncompressFunc type defintion. To emphasis | 6 | Fixes: 86a637e48104 ("coroutine: cap per-thread local pool size") |
4 | dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions, | 7 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
5 | declare them using this new typedef. | 8 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
6 | 9 | Message-id: 20240320181232.1464819-1-stefanha@redhat.com | |
7 | Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | ||
8 | Message-id: 20230320152610.32052-1-philmd@linaro.org | ||
9 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 10 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
10 | --- | 11 | --- |
11 | block/dmg.h | 8 ++++---- | 12 | util/qemu-coroutine.c | 15 ++++++++++----- |
12 | block/dmg.c | 7 ++----- | 13 | 1 file changed, 10 insertions(+), 5 deletions(-) |
13 | 2 files changed, 6 insertions(+), 9 deletions(-) | ||
14 | 14 | ||
15 | diff --git a/block/dmg.h b/block/dmg.h | 15 | diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c |
16 | index XXXXXXX..XXXXXXX 100644 | 16 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/block/dmg.h | 17 | --- a/util/qemu-coroutine.c |
18 | +++ b/block/dmg.h | 18 | +++ b/util/qemu-coroutine.c |
19 | @@ -XXX,XX +XXX,XX @@ typedef struct BDRVDMGState { | 19 | @@ -XXX,XX +XXX,XX @@ static unsigned int get_global_pool_hard_max_size(void) |
20 | z_stream zstream; | 20 | NULL) && |
21 | } BDRVDMGState; | 21 | qemu_strtoi(contents, NULL, 10, &max_map_count) == 0) { |
22 | 22 | /* | |
23 | -extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in, | 23 | - * This is a conservative upper bound that avoids exceeding |
24 | - char *next_out, unsigned int avail_out); | 24 | - * max_map_count. Leave half for non-coroutine users like library |
25 | +typedef int BdrvDmgUncompressFunc(char *next_in, unsigned int avail_in, | 25 | - * dependencies, vhost-user, etc. Each coroutine takes up 2 VMAs so |
26 | + char *next_out, unsigned int avail_out); | 26 | - * halve the amount again. |
27 | 27 | + * This is an upper bound that avoids exceeding max_map_count. Leave a | |
28 | -extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in, | 28 | + * fixed amount for non-coroutine users like library dependencies, |
29 | - char *next_out, unsigned int avail_out); | 29 | + * vhost-user, etc. Each coroutine takes up 2 VMAs so halve the |
30 | +extern BdrvDmgUncompressFunc *dmg_uncompress_bz2; | 30 | + * remaining amount. |
31 | +extern BdrvDmgUncompressFunc *dmg_uncompress_lzfse; | 31 | */ |
32 | 32 | - return max_map_count / 4; | |
33 | + if (max_map_count > 5000) { | ||
34 | + return (max_map_count - 5000) / 2; | ||
35 | + } else { | ||
36 | + /* Disable the global pool but threads still have local pools */ | ||
37 | + return 0; | ||
38 | + } | ||
39 | } | ||
33 | #endif | 40 | #endif |
34 | diff --git a/block/dmg.c b/block/dmg.c | 41 | |
35 | index XXXXXXX..XXXXXXX 100644 | ||
36 | --- a/block/dmg.c | ||
37 | +++ b/block/dmg.c | ||
38 | @@ -XXX,XX +XXX,XX @@ | ||
39 | #include "qemu/memalign.h" | ||
40 | #include "dmg.h" | ||
41 | |||
42 | -int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in, | ||
43 | - char *next_out, unsigned int avail_out); | ||
44 | - | ||
45 | -int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in, | ||
46 | - char *next_out, unsigned int avail_out); | ||
47 | +BdrvDmgUncompressFunc *dmg_uncompress_bz2; | ||
48 | +BdrvDmgUncompressFunc *dmg_uncompress_lzfse; | ||
49 | |||
50 | enum { | ||
51 | /* Limit chunk sizes to prevent unreasonable amounts of memory being used | ||
52 | -- | 42 | -- |
53 | 2.39.2 | 43 | 2.44.0 |
54 | 44 | ||
55 | 45 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> | ||
2 | 1 | ||
3 | The event filename is an absolute path. Convert it to a relative path when | ||
4 | writing '#line' directives, to preserve reproducibility of the generated | ||
5 | output when different base paths are used. | ||
6 | |||
7 | Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> | ||
8 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
9 | Message-Id: <20230406080045.21696-1-thomas.de_schampheleire@nokia.com> | ||
10 | --- | ||
11 | scripts/tracetool/backend/ftrace.py | 4 +++- | ||
12 | scripts/tracetool/backend/log.py | 4 +++- | ||
13 | scripts/tracetool/backend/syslog.py | 4 +++- | ||
14 | 3 files changed, 9 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/scripts/tracetool/backend/ftrace.py b/scripts/tracetool/backend/ftrace.py | ||
17 | index XXXXXXX..XXXXXXX 100644 | ||
18 | --- a/scripts/tracetool/backend/ftrace.py | ||
19 | +++ b/scripts/tracetool/backend/ftrace.py | ||
20 | @@ -XXX,XX +XXX,XX @@ | ||
21 | __email__ = "stefanha@redhat.com" | ||
22 | |||
23 | |||
24 | +import os.path | ||
25 | + | ||
26 | from tracetool import out | ||
27 | |||
28 | |||
29 | @@ -XXX,XX +XXX,XX @@ def generate_h(event, group): | ||
30 | args=event.args, | ||
31 | event_id="TRACE_" + event.name.upper(), | ||
32 | event_lineno=event.lineno, | ||
33 | - event_filename=event.filename, | ||
34 | + event_filename=os.path.relpath(event.filename), | ||
35 | fmt=event.fmt.rstrip("\n"), | ||
36 | argnames=argnames) | ||
37 | |||
38 | diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py | ||
39 | index XXXXXXX..XXXXXXX 100644 | ||
40 | --- a/scripts/tracetool/backend/log.py | ||
41 | +++ b/scripts/tracetool/backend/log.py | ||
42 | @@ -XXX,XX +XXX,XX @@ | ||
43 | __email__ = "stefanha@redhat.com" | ||
44 | |||
45 | |||
46 | +import os.path | ||
47 | + | ||
48 | from tracetool import out | ||
49 | |||
50 | |||
51 | @@ -XXX,XX +XXX,XX @@ def generate_h(event, group): | ||
52 | ' }', | ||
53 | cond=cond, | ||
54 | event_lineno=event.lineno, | ||
55 | - event_filename=event.filename, | ||
56 | + event_filename=os.path.relpath(event.filename), | ||
57 | name=event.name, | ||
58 | fmt=event.fmt.rstrip("\n"), | ||
59 | argnames=argnames) | ||
60 | diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py | ||
61 | index XXXXXXX..XXXXXXX 100644 | ||
62 | --- a/scripts/tracetool/backend/syslog.py | ||
63 | +++ b/scripts/tracetool/backend/syslog.py | ||
64 | @@ -XXX,XX +XXX,XX @@ | ||
65 | __email__ = "stefanha@redhat.com" | ||
66 | |||
67 | |||
68 | +import os.path | ||
69 | + | ||
70 | from tracetool import out | ||
71 | |||
72 | |||
73 | @@ -XXX,XX +XXX,XX @@ def generate_h(event, group): | ||
74 | ' }', | ||
75 | cond=cond, | ||
76 | event_lineno=event.lineno, | ||
77 | - event_filename=event.filename, | ||
78 | + event_filename=os.path.relpath(event.filename), | ||
79 | name=event.name, | ||
80 | fmt=event.fmt.rstrip("\n"), | ||
81 | argnames=argnames) | ||
82 | -- | ||
83 | 2.39.2 | diff view generated by jsdifflib |