1
The following changes since commit 8048082f7a11040a366942a2de8abb4c3d0020c9:
1
The following changes since commit 6338c30111d596d955e6bc933a82184a0b910c43:
2
2
3
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-11-15-1' into staging (2017-11-16 11:34:24 +0000)
3
Merge tag 'm68k-for-7.2-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-09-21 13:12:36 -0400)
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 341e0b5658681f46680024cdbfc998717d85cc35:
9
for you to fetch changes up to f16d15c9276bd8f501f861c39cbd4adc812d0c1d:
10
10
11
throttle-groups: forget timer and schedule next TGM on detach (2017-11-16 14:12:57 +0000)
11
virtiofsd: use g_date_time_get_microsecond to get subsecond (2022-09-22 13:13:47 -0400)
12
13
----------------------------------------------------------------
14
Pull request
12
15
13
----------------------------------------------------------------
16
----------------------------------------------------------------
14
17
15
----------------------------------------------------------------
18
Yusuke Okada (1):
19
virtiofsd: use g_date_time_get_microsecond to get subsecond
16
20
17
Stefan Hajnoczi (1):
21
tools/virtiofsd/passthrough_ll.c | 7 +++++--
18
throttle-groups: forget timer and schedule next TGM on detach
22
1 file changed, 5 insertions(+), 2 deletions(-)
19
20
block/throttle-groups.c | 12 ++++++++++++
21
1 file changed, 12 insertions(+)
22
23
23
--
24
--
24
2.13.6
25
2.37.3
25
26
diff view generated by jsdifflib
1
tg->any_timer_armed[] must be cleared when detaching pending timers from
1
From: Yusuke Okada <okada.yusuke@jp.fujitsu.com>
2
the AioContext. Failure to do so leads to hung I/O because it looks
3
like there are still timers pending when in fact they have been removed.
4
2
5
Other ThrottleGroupMembers might have requests pending too so it's
3
The "%f" specifier in g_date_time_format() is only available in glib
6
necessary to schedule the next TGM so it can set a timer.
4
2.65.2 or later. If combined with older glib, the function returns null
5
and the timestamp displayed as "(null)".
7
6
8
This patch fixes hung I/O when QEMU is launched with drives that are in
7
For backward compatibility, g_date_time_get_microsecond should be used
9
the same throttling group:
8
to retrieve subsecond.
10
9
11
(guest)$ dd if=/dev/zero of=/dev/vdb oflag=direct bs=512 &
10
In this patch the g_date_time_format() leaves subsecond field as "%06d"
12
(guest)$ dd if=/dev/zero of=/dev/vdc oflag=direct bs=512 &
11
and let next snprintf to format with g_date_time_get_microsecond.
13
(qemu) stop
14
(qemu) cont
15
...I/O is stuck...
16
12
17
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
13
Signed-off-by: Yusuke Okada <okada.yusuke@jp.fujitsu.com>
18
Message-id: 20171116112150.27607-1-stefanha@redhat.com
14
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
15
Message-id: 20220818184618.2205172-1-yokada.996@gmail.com
19
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
16
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
20
---
17
---
21
block/throttle-groups.c | 12 ++++++++++++
18
tools/virtiofsd/passthrough_ll.c | 7 +++++--
22
1 file changed, 12 insertions(+)
19
1 file changed, 5 insertions(+), 2 deletions(-)
23
20
24
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
21
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
25
index XXXXXXX..XXXXXXX 100644
22
index XXXXXXX..XXXXXXX 100644
26
--- a/block/throttle-groups.c
23
--- a/tools/virtiofsd/passthrough_ll.c
27
+++ b/block/throttle-groups.c
24
+++ b/tools/virtiofsd/passthrough_ll.c
28
@@ -XXX,XX +XXX,XX @@ void throttle_group_attach_aio_context(ThrottleGroupMember *tgm,
25
@@ -XXX,XX +XXX,XX @@ static void setup_nofile_rlimit(unsigned long rlimit_nofile)
29
26
static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
30
void throttle_group_detach_aio_context(ThrottleGroupMember *tgm)
31
{
27
{
32
+ ThrottleGroup *tg = container_of(tgm->throttle_state, ThrottleGroup, ts);
28
g_autofree char *localfmt = NULL;
33
ThrottleTimers *tt = &tgm->throttle_timers;
29
+ char buf[64];
34
+ int i;
30
35
31
if (current_log_level < level) {
36
/* Requests must have been drained */
32
return;
37
assert(tgm->pending_reqs[0] == 0 && tgm->pending_reqs[1] == 0);
33
@@ -XXX,XX +XXX,XX @@ static void log_func(enum fuse_log_level level, const char *fmt, va_list ap)
38
assert(qemu_co_queue_empty(&tgm->throttled_reqs[0]));
34
fmt);
39
assert(qemu_co_queue_empty(&tgm->throttled_reqs[1]));
35
} else {
40
36
g_autoptr(GDateTime) now = g_date_time_new_now_utc();
41
+ /* Kick off next ThrottleGroupMember, if necessary */
37
- g_autofree char *nowstr = g_date_time_format(now, "%Y-%m-%d %H:%M:%S.%f%z");
42
+ qemu_mutex_lock(&tg->lock);
38
+ g_autofree char *nowstr = g_date_time_format(now,
43
+ for (i = 0; i < 2; i++) {
39
+ "%Y-%m-%d %H:%M:%S.%%06d%z");
44
+ if (timer_pending(tt->timers[i])) {
40
+ snprintf(buf, 64, nowstr, g_date_time_get_microsecond(now));
45
+ tg->any_timer_armed[i] = false;
41
localfmt = g_strdup_printf("[%s] [ID: %08ld] %s",
46
+ schedule_next_request(tgm, i);
42
- nowstr, syscall(__NR_gettid), fmt);
47
+ }
43
+ buf, syscall(__NR_gettid), fmt);
48
+ }
44
}
49
+ qemu_mutex_unlock(&tg->lock);
45
fmt = localfmt;
50
+
46
}
51
throttle_timers_detach_aio_context(tt);
52
tgm->aio_context = NULL;
53
}
54
--
47
--
55
2.13.6
48
2.37.3
56
57
diff view generated by jsdifflib