1
The following changes since commit fb68096da3d35e64c88cd610c1fa42766c58e92a:
1
The following changes since commit 3521ade3510eb5cefb2e27a101667f25dad89935:
2
2
3
Revert "tests: use memfd in vhost-user-test" (2018-02-13 09:51:52 +0000)
3
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-29' into staging (2021-07-29 13:17:20 +0100)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
git://github.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 64b01feca991e5b19a5d750ef77cdca92b68bdbb:
9
for you to fetch changes up to cc8eecd7f105a1dff5876adeb238a14696061a4a:
10
10
11
misc: fix spelling (2018-02-13 15:38:17 +0000)
11
MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver (2021-07-29 17:17:34 +0100)
12
13
----------------------------------------------------------------
14
Pull request
15
16
The main fix here is for io_uring. Spurious -EAGAIN errors can happen and the
17
request needs to be resubmitted.
18
19
The MAINTAINERS changes carry no risk and we might as well include them in QEMU
20
6.1.
12
21
13
----------------------------------------------------------------
22
----------------------------------------------------------------
14
23
15
----------------------------------------------------------------
24
Fabian Ebner (1):
25
block/io_uring: resubmit when result is -EAGAIN
16
26
17
Fam Zheng (2):
27
Philippe Mathieu-Daudé (1):
18
Add a git-publish configuration file
28
MAINTAINERS: Added myself as a reviewer for the NVMe Block Driver
19
README: Document 'git-publish' workflow
20
29
21
Marc-André Lureau (1):
30
Stefano Garzarella (1):
22
misc: fix spelling
31
MAINTAINERS: add Stefano Garzarella as io_uring reviewer
23
32
24
Stefan Hajnoczi (1):
33
MAINTAINERS | 2 ++
25
vl: pause vcpus before stopping iothreads
34
block/io_uring.c | 16 +++++++++++++++-
26
35
2 files changed, 17 insertions(+), 1 deletion(-)
27
Wolfgang Bumiller (1):
28
ratelimit: don't align wait time with slices
29
30
include/qemu/ratelimit.h | 11 ++++-----
31
util/qemu-coroutine-lock.c | 2 +-
32
vl.c | 12 ++++++++--
33
.gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++
34
README | 31 ++++++++++++++++++++++++-
35
5 files changed, 104 insertions(+), 10 deletions(-)
36
create mode 100644 .gitpublish
37
36
38
--
37
--
39
2.14.3
38
2.31.1
40
39
41
diff view generated by jsdifflib
Deleted patch
1
From: Fam Zheng <famz@redhat.com>
2
1
3
git-publish [1] is a convenient tool to send patches and has been
4
popular among QEMU developers. Recently it has been made available in
5
Fedora official repo thanks to Stefan's work.
6
7
One nice feature of the tool is a per-project configuration with
8
profiles, especially in which the cccmd option is a handy method to
9
create the Cc list.
10
11
[1]: https://github.com/stefanha/git-publish
12
13
Signed-off-by: Fam Zheng <famz@redhat.com>
14
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
15
Message-id: 20180205054725.25634-2-famz@redhat.com
16
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
17
---
18
.gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19
1 file changed, 58 insertions(+)
20
create mode 100644 .gitpublish
21
22
diff --git a/.gitpublish b/.gitpublish
23
new file mode 100644
24
index XXXXXXX..XXXXXXX
25
--- /dev/null
26
+++ b/.gitpublish
27
@@ -XXX,XX +XXX,XX @@
28
+#
29
+# Common git-publish profiles that can be used to send patches to QEMU upstream.
30
+#
31
+# See https://github.com/stefanha/git-publish for more information
32
+#
33
+[gitpublishprofile "default"]
34
+base = master
35
+prefix = PATCH
36
+to = qemu-devel@nongnu.org
37
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
38
+
39
+[gitpublishprofile "rfc"]
40
+base = master
41
+prefix = RFC PATCH
42
+to = qemu-devel@nongnu.org
43
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
44
+
45
+[gitpublishprofile "stable"]
46
+base = master
47
+prefix = PATCH
48
+to = qemu-devel@nongnu.org
49
+cc = qemu-stable@nongnu.org
50
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
51
+
52
+[gitpublishprofile "trivial"]
53
+base = master
54
+prefix = PATCH
55
+to = qemu-devel@nongnu.org
56
+cc = qemu-trivial@nongnu.org
57
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
58
+
59
+[gitpublishprofile "block"]
60
+base = master
61
+prefix = PATCH
62
+to = qemu-devel@nongnu.org
63
+cc = qemu-block@nongnu.org
64
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
65
+
66
+[gitpublishprofile "arm"]
67
+base = master
68
+prefix = PATCH
69
+to = qemu-devel@nongnu.org
70
+cc = qemu-arm@nongnu.org
71
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
72
+
73
+[gitpublishprofile "s390"]
74
+base = master
75
+prefix = PATCH
76
+to = qemu-devel@nongnu.org
77
+cc = qemu-s390@nongnu.org
78
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
79
+
80
+[gitpublishprofile "ppc"]
81
+base = master
82
+prefix = PATCH
83
+to = qemu-devel@nongnu.org
84
+cc = qemu-ppc@nongnu.org
85
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
86
--
87
2.14.3
88
89
diff view generated by jsdifflib
Deleted patch
1
From: Fam Zheng <famz@redhat.com>
2
1
3
[Fixed s/git-profile/git-publish/ typo and s/for once/the first time/.
4
--Stefan]
5
6
Signed-off-by: Fam Zheng <famz@redhat.com>
7
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
8
Message-id: 20180205054725.25634-3-famz@redhat.com
9
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10
---
11
README | 31 ++++++++++++++++++++++++++++++-
12
1 file changed, 30 insertions(+), 1 deletion(-)
13
14
diff --git a/README b/README
15
index XXXXXXX..XXXXXXX 100644
16
--- a/README
17
+++ b/README
18
@@ -XXX,XX +XXX,XX @@ The QEMU source code is maintained under the GIT version control system.
19
20
git clone git://git.qemu.org/qemu.git
21
22
-When submitting patches, the preferred approach is to use 'git
23
+When submitting patches, one common approach is to use 'git
24
format-patch' and/or 'git send-email' to format & send the mail to the
25
qemu-devel@nongnu.org mailing list. All patches submitted must contain
26
a 'Signed-off-by' line from the author. Patches should follow the
27
guidelines set out in the HACKING and CODING_STYLE files.
28
29
+A 'git-publish' utility was created to make above process less
30
+cumbersome, and is highly recommended for making regular contributions,
31
+or even just for sending consecutive patch series revisions. It also
32
+requires a working 'git send-email' setup, and by default doesn't
33
+automate everything, so you may want to go through the above steps
34
+manually the first time.
35
+
36
+For installation instructions, please go to
37
+
38
+ https://github.com/stefanha/git-publish
39
+
40
+The workflow with 'git-publish' is:
41
+
42
+ $ git checkout master -b my-feature
43
+ $ # work on new commits, add your 'Signed-off-by' lines to each
44
+ $ git publish
45
+
46
+Your patch series will be sent and tagged as my-feature-v1 if you need to refer
47
+back to it in the future.
48
+
49
+Sending v2:
50
+
51
+ $ git checkout my-feature # same topic branch
52
+ $ # making changes to the commits (using 'git rebase', for example)
53
+ $ git publish
54
+
55
+Your patch series will be sent with 'v2' tag in the subject and the git tip
56
+will be tagged as my-feature-v2.
57
+
58
Additional information on submitting patches can be found online via
59
the QEMU website
60
61
--
62
2.14.3
63
64
diff view generated by jsdifflib
1
From: Marc-André Lureau <marcandre.lureau@redhat.com>
1
From: Stefano Garzarella <sgarzare@redhat.com>
2
2
3
s/pupulate/populate
3
I've been working with io_uring for a while so I'd like to help
4
with reviews.
4
5
5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
6
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
6
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
7
Message-Id: <20210728131515.131045-1-sgarzare@redhat.com>
7
Message-id: 20180208162447.10851-1-marcandre.lureau@redhat.com
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
---
9
---
10
util/qemu-coroutine-lock.c | 2 +-
10
MAINTAINERS | 1 +
11
1 file changed, 1 insertion(+), 1 deletion(-)
11
1 file changed, 1 insertion(+)
12
12
13
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
13
diff --git a/MAINTAINERS b/MAINTAINERS
14
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
15
--- a/util/qemu-coroutine-lock.c
15
--- a/MAINTAINERS
16
+++ b/util/qemu-coroutine-lock.c
16
+++ b/MAINTAINERS
17
@@ -XXX,XX +XXX,XX @@ void qemu_co_queue_run_restart(Coroutine *co)
17
@@ -XXX,XX +XXX,XX @@ Linux io_uring
18
* invalid memory. Therefore, use a temporary queue and do not touch
18
M: Aarushi Mehta <mehta.aaru20@gmail.com>
19
* the "co" coroutine as soon as you enter another one.
19
M: Julia Suvorova <jusual@redhat.com>
20
*
20
M: Stefan Hajnoczi <stefanha@redhat.com>
21
- * In its turn resumed "co" can pupulate "co_queue_wakeup" queue with
21
+R: Stefano Garzarella <sgarzare@redhat.com>
22
+ * In its turn resumed "co" can populate "co_queue_wakeup" queue with
22
L: qemu-block@nongnu.org
23
* new coroutines to be woken up. The caller, who has resumed "co",
23
S: Maintained
24
* will be responsible for traversing the same queue, which may cause
24
F: block/io_uring.c
25
* a different wakeup order but not any missing wakeups.
26
--
25
--
27
2.14.3
26
2.31.1
28
27
29
diff view generated by jsdifflib
1
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
1
From: Fabian Ebner <f.ebner@proxmox.com>
2
2
3
It is possible for rate limited writes to keep overshooting a slice's
3
Linux SCSI can throw spurious -EAGAIN in some corner cases in its
4
quota by a tiny amount causing the slice-aligned waiting period to
4
completion path, which will end up being the result in the completed
5
effectively halve the rate.
5
io_uring request.
6
6
7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
7
Resubmitting such requests should allow block jobs to complete, even
8
Reviewed-by: Alberto Garcia <berto@igalia.com>
8
if such spurious errors are encountered.
9
Message-id: 20180207071758.6818-1-w.bumiller@proxmox.com
9
10
Co-authored-by: Stefan Hajnoczi <stefanha@gmail.com>
11
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
12
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
13
Message-id: 20210729091029.65369-1-f.ebner@proxmox.com
10
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
14
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11
---
15
---
12
include/qemu/ratelimit.h | 11 +++++------
16
block/io_uring.c | 16 +++++++++++++++-
13
1 file changed, 5 insertions(+), 6 deletions(-)
17
1 file changed, 15 insertions(+), 1 deletion(-)
14
18
15
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
19
diff --git a/block/io_uring.c b/block/io_uring.c
16
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
17
--- a/include/qemu/ratelimit.h
21
--- a/block/io_uring.c
18
+++ b/include/qemu/ratelimit.h
22
+++ b/block/io_uring.c
19
@@ -XXX,XX +XXX,XX @@ typedef struct {
23
@@ -XXX,XX +XXX,XX @@ static void luring_process_completions(LuringState *s)
20
static inline int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n)
24
total_bytes = ret + luringcb->total_read;
21
{
25
22
int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
26
if (ret < 0) {
23
- uint64_t delay_slices;
27
- if (ret == -EINTR) {
24
+ double delay_slices;
28
+ /*
25
29
+ * Only writev/readv/fsync requests on regular files or host block
26
assert(limit->slice_quota && limit->slice_ns);
30
+ * devices are submitted. Therefore -EAGAIN is not expected but it's
27
31
+ * known to happen sometimes with Linux SCSI. Submit again and hope
28
@@ -XXX,XX +XXX,XX @@ static inline int64_t ratelimit_calculate_delay(RateLimit *limit, uint64_t n)
32
+ * the request completes successfully.
29
return 0;
33
+ *
30
}
34
+ * For more information, see:
31
35
+ * https://lore.kernel.org/io-uring/20210727165811.284510-3-axboe@kernel.dk/T/#u
32
- /* Quota exceeded. Calculate the next time slice we may start
36
+ *
33
- * sending data again. */
37
+ * If the code is changed to submit other types of requests in the
34
- delay_slices = (limit->dispatched + limit->slice_quota - 1) /
38
+ * future, then this workaround may need to be extended to deal with
35
- limit->slice_quota;
39
+ * genuine -EAGAIN results that should not be resubmitted
36
+ /* Quota exceeded. Wait based on the excess amount and then start a new
40
+ * immediately.
37
+ * slice. */
41
+ */
38
+ delay_slices = (double)limit->dispatched / limit->slice_quota;
42
+ if (ret == -EINTR || ret == -EAGAIN) {
39
limit->slice_end_time = limit->slice_start_time +
43
luring_resubmit(s, luringcb);
40
- delay_slices * limit->slice_ns;
44
continue;
41
+ (uint64_t)(delay_slices * limit->slice_ns);
45
}
42
return limit->slice_end_time - now;
43
}
44
45
--
46
--
46
2.14.3
47
2.31.1
47
48
48
diff view generated by jsdifflib
1
Commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
before main() quits") introduced iothread_stop_all() to avoid the
3
following virtio-scsi assertion failure:
4
2
5
assert(blk_get_aio_context(d->conf.blk) == s->ctx);
3
I'm interested in following the activity around the NVMe bdrv.
6
4
7
Back then the assertion failed because when bdrv_close_all() made
5
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
8
d->conf.blk NULL, blk_get_aio_context() returned the global AioContext
6
Message-id: 20210728183340.2018313-1-philmd@redhat.com
9
instead of s->ctx.
10
11
The same assertion can still fail today when vcpus submit new I/O
12
requests after iothread_stop_all() has moved the BDS to the global
13
AioContext.
14
15
This patch hardens the iothread_stop_all() approach by pausing vcpus
16
before calling iothread_stop_all().
17
18
Note that the assertion failure is a race condition. It is not possible
19
to reproduce it reliably.
20
21
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22
Message-id: 20180201110708.8080-1-stefanha@redhat.com
23
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
7
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
24
---
8
---
25
vl.c | 12 ++++++++++--
9
MAINTAINERS | 1 +
26
1 file changed, 10 insertions(+), 2 deletions(-)
10
1 file changed, 1 insertion(+)
27
11
28
diff --git a/vl.c b/vl.c
12
diff --git a/MAINTAINERS b/MAINTAINERS
29
index XXXXXXX..XXXXXXX 100644
13
index XXXXXXX..XXXXXXX 100644
30
--- a/vl.c
14
--- a/MAINTAINERS
31
+++ b/vl.c
15
+++ b/MAINTAINERS
32
@@ -XXX,XX +XXX,XX @@ int main(int argc, char **argv, char **envp)
16
@@ -XXX,XX +XXX,XX @@ F: block/null.c
33
17
NVMe Block Driver
34
main_loop();
18
M: Stefan Hajnoczi <stefanha@redhat.com>
35
replay_disable_events();
19
R: Fam Zheng <fam@euphon.net>
36
+
20
+R: Philippe Mathieu-Daudé <philmd@redhat.com>
37
+ /* The ordering of the following is delicate. Stop vcpus to prevent new
21
L: qemu-block@nongnu.org
38
+ * I/O requests being queued by the guest. Then stop IOThreads (this
22
S: Supported
39
+ * includes a drain operation and completes all request processing). At
23
F: block/nvme*
40
+ * this point emulated devices are still associated with their IOThreads
41
+ * (if any) but no longer have any work to do. Only then can we close
42
+ * block devices safely because we know there is no more I/O coming.
43
+ */
44
+ pause_all_vcpus();
45
iothread_stop_all();
46
-
47
- pause_all_vcpus();
48
bdrv_close_all();
49
+
50
res_free();
51
52
/* vhost-user must be cleaned up before chardevs. */
53
--
24
--
54
2.14.3
25
2.31.1
55
26
56
diff view generated by jsdifflib