1
The following changes since commit 6cb4f6db4f4367faa33da85b15f75bbbd2bed2a6:
1
The following changes since commit 474f3938d79ab36b9231c9ad3b5a9314c2aeacde:
2
2
3
Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging (2019-03-07 16:16:02 +0000)
3
Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-21-2019' into staging (2019-06-21 15:40:50 +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://github.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to 6ca206204fa773c8626d59caf2a5676d6cc35f52:
9
for you to fetch changes up to 6c11dda922915aaaa032db4462294e8df45f7441:
10
10
11
iothread: document about why we need explicit aio_poll() (2019-03-08 10:20:57 +0000)
11
build: use $(DESTDIR)x instead of $(DESTDIR)/x (2019-06-28 14:12:14 +0100)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
No user-visible changes.
17
16
----------------------------------------------------------------
18
----------------------------------------------------------------
17
19
18
Anastasiia Rusakova (1):
20
Stefan Hajnoczi (1):
19
hw/block/virtio-blk: Clean req->dev repetitions
21
build: use $(DESTDIR)x instead of $(DESTDIR)/x
20
22
21
Peter Xu (5):
23
Makefile | 16 ++++++++--------
22
iothread: replace init_done_cond with a semaphore
24
1 file changed, 8 insertions(+), 8 deletions(-)
23
iothread: create the gcontext unconditionally
24
iothread: create main loop unconditionally
25
iothread: push gcontext earlier in the thread_fn
26
iothread: document about why we need explicit aio_poll()
27
28
Stefan Hajnoczi (1):
29
MAINTAINERS: add missing support status fields
30
31
MAINTAINERS | 3 ++
32
include/sysemu/iothread.h | 5 +--
33
hw/block/virtio-blk.c | 16 ++++---
34
iothread.c | 90 +++++++++++++++++++--------------------
35
4 files changed, 57 insertions(+), 57 deletions(-)
36
25
37
--
26
--
38
2.20.1
27
2.21.0
39
28
40
29
diff view generated by jsdifflib
Deleted patch
1
This patch adds the "S:" line for areas of the codebase that currently
2
lack a support status field.
3
1
4
Note that there are a few more areas that are more abstract and do not
5
correspond to a specific set of files. They have not been modified.
6
7
Cc: Alex Bennée <alex.bennee@linaro.org>
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
Reviewed-by: Thomas Huth <thuth@redhat.com>
10
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
11
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
12
Message-id: 20190301163518.20702-1-stefanha@redhat.com
13
Message-Id: <20190301163518.20702-1-stefanha@redhat.com>
14
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
15
---
16
MAINTAINERS | 3 +++
17
1 file changed, 3 insertions(+)
18
19
diff --git a/MAINTAINERS b/MAINTAINERS
20
index XXXXXXX..XXXXXXX 100644
21
--- a/MAINTAINERS
22
+++ b/MAINTAINERS
23
@@ -XXX,XX +XXX,XX @@ F: include/hw/tricore/
24
25
Multiarch Linux User Tests
26
M: Alex Bennée <alex.bennee@linaro.org>
27
+S: Maintained
28
F: tests/tcg/multiarch/
29
30
Guest CPU Cores (KVM):
31
@@ -XXX,XX +XXX,XX @@ F: qemu.sasl
32
Coroutines
33
M: Stefan Hajnoczi <stefanha@redhat.com>
34
M: Kevin Wolf <kwolf@redhat.com>
35
+S: Maintained
36
F: util/*coroutine*
37
F: include/qemu/coroutine*
38
F: tests/test-coroutine.c
39
@@ -XXX,XX +XXX,XX @@ F: .gitlab-ci.yml
40
Guest Test Compilation Support
41
M: Alex Bennée <alex.bennee@linaro.org>
42
R: Philippe Mathieu-Daudé <f4bug@amsat.org>
43
+S: Maintained
44
F: tests/tcg/Makefile
45
F: tests/tcg/Makefile.include
46
L: qemu-devel@nongnu.org
47
--
48
2.20.1
49
50
diff view generated by jsdifflib
Deleted patch
1
From: Anastasiia Rusakova <arusakova917@gmail.com>
2
1
3
Some functions sometimes uses req->dev even though a local variable
4
VirtIOBlock* s = req->dev has already been defined.
5
Updated places to use s everywhere in the file.
6
7
Signed-off-by: Anastasiia Rusakova <arusakova917@gmail.com>
8
Message-id: 20190307161925.4158-1-rusakova.nastasia@icloud.com
9
Message-Id: <20190307161925.4158-1-rusakova.nastasia@icloud.com>
10
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11
---
12
hw/block/virtio-blk.c | 16 +++++++++-------
13
1 file changed, 9 insertions(+), 7 deletions(-)
14
15
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
16
index XXXXXXX..XXXXXXX 100644
17
--- a/hw/block/virtio-blk.c
18
+++ b/hw/block/virtio-blk.c
19
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_rw_complete(void *opaque, int ret)
20
}
21
22
if (ret) {
23
- int p = virtio_ldl_p(VIRTIO_DEVICE(req->dev), &req->out.type);
24
+ int p = virtio_ldl_p(VIRTIO_DEVICE(s), &req->out.type);
25
bool is_read = !(p & VIRTIO_BLK_T_OUT);
26
/* Note that memory may be dirtied on read failure. If the
27
* virtio request is not completed here, as is the case for
28
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_rw_complete(void *opaque, int ret)
29
}
30
31
virtio_blk_req_complete(req, VIRTIO_BLK_S_OK);
32
- block_acct_done(blk_get_stats(req->dev->blk), &req->acct);
33
+ block_acct_done(blk_get_stats(s->blk), &req->acct);
34
virtio_blk_free_request(req);
35
}
36
aio_context_release(blk_get_aio_context(s->conf.conf.blk));
37
@@ -XXX,XX +XXX,XX @@ static int virtio_blk_handle_scsi_req(VirtIOBlockReq *req)
38
{
39
int status = VIRTIO_BLK_S_OK;
40
struct virtio_scsi_inhdr *scsi = NULL;
41
- VirtIODevice *vdev = VIRTIO_DEVICE(req->dev);
42
- VirtQueueElement *elem = &req->elem;
43
VirtIOBlock *blk = req->dev;
44
+ VirtIODevice *vdev = VIRTIO_DEVICE(blk);
45
+ VirtQueueElement *elem = &req->elem;
46
47
#ifdef __linux__
48
int i;
49
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_submit_multireq(BlockBackend *blk, MultiReqBuffer *mrb)
50
51
static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb)
52
{
53
- block_acct_start(blk_get_stats(req->dev->blk), &req->acct, 0,
54
+ VirtIOBlock *s = req->dev;
55
+
56
+ block_acct_start(blk_get_stats(s->blk), &req->acct, 0,
57
BLOCK_ACCT_FLUSH);
58
59
/*
60
* Make sure all outstanding writes are posted to the backing device.
61
*/
62
if (mrb->is_write && mrb->num_reqs > 0) {
63
- virtio_blk_submit_multireq(req->dev->blk, mrb);
64
+ virtio_blk_submit_multireq(s->blk, mrb);
65
}
66
- blk_aio_flush(req->dev->blk, virtio_blk_flush_complete, req);
67
+ blk_aio_flush(s->blk, virtio_blk_flush_complete, req);
68
}
69
70
static bool virtio_blk_sect_range_ok(VirtIOBlock *dev,
71
--
72
2.20.1
73
74
diff view generated by jsdifflib
Deleted patch
1
From: Peter Xu <peterx@redhat.com>
2
1
3
Only sending an init-done message using lock+cond seems an overkill to
4
me. Replacing it with a simpler semaphore.
5
6
Meanwhile, init the semaphore unconditionally, then we can destroy it
7
unconditionally too in finalize which seems cleaner.
8
9
Signed-off-by: Peter Xu <peterx@redhat.com>
10
Message-id: 20190306115532.23025-2-peterx@redhat.com
11
Message-Id: <20190306115532.23025-2-peterx@redhat.com>
12
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
13
---
14
include/sysemu/iothread.h | 3 +--
15
iothread.c | 17 ++++-------------
16
2 files changed, 5 insertions(+), 15 deletions(-)
17
18
diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h
19
index XXXXXXX..XXXXXXX 100644
20
--- a/include/sysemu/iothread.h
21
+++ b/include/sysemu/iothread.h
22
@@ -XXX,XX +XXX,XX @@ typedef struct {
23
GMainContext *worker_context;
24
GMainLoop *main_loop;
25
GOnce once;
26
- QemuMutex init_done_lock;
27
- QemuCond init_done_cond; /* is thread initialization done? */
28
+ QemuSemaphore init_done_sem; /* is thread init done? */
29
bool stopping; /* has iothread_stop() been called? */
30
bool running; /* should iothread_run() continue? */
31
int thread_id;
32
diff --git a/iothread.c b/iothread.c
33
index XXXXXXX..XXXXXXX 100644
34
--- a/iothread.c
35
+++ b/iothread.c
36
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
37
rcu_register_thread();
38
39
my_iothread = iothread;
40
- qemu_mutex_lock(&iothread->init_done_lock);
41
iothread->thread_id = qemu_get_thread_id();
42
- qemu_cond_signal(&iothread->init_done_cond);
43
- qemu_mutex_unlock(&iothread->init_done_lock);
44
+ qemu_sem_post(&iothread->init_done_sem);
45
46
while (iothread->running) {
47
aio_poll(iothread->ctx, true);
48
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_init(Object *obj)
49
50
iothread->poll_max_ns = IOTHREAD_POLL_MAX_NS_DEFAULT;
51
iothread->thread_id = -1;
52
+ qemu_sem_init(&iothread->init_done_sem, 0);
53
}
54
55
static void iothread_instance_finalize(Object *obj)
56
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj)
57
58
iothread_stop(iothread);
59
60
- if (iothread->thread_id != -1) {
61
- qemu_cond_destroy(&iothread->init_done_cond);
62
- qemu_mutex_destroy(&iothread->init_done_lock);
63
- }
64
/*
65
* Before glib2 2.33.10, there is a glib2 bug that GSource context
66
* pointer may not be cleared even if the context has already been
67
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj)
68
g_main_context_unref(iothread->worker_context);
69
iothread->worker_context = NULL;
70
}
71
+ qemu_sem_destroy(&iothread->init_done_sem);
72
}
73
74
static void iothread_complete(UserCreatable *obj, Error **errp)
75
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
76
return;
77
}
78
79
- qemu_mutex_init(&iothread->init_done_lock);
80
- qemu_cond_init(&iothread->init_done_cond);
81
iothread->once = (GOnce) G_ONCE_INIT;
82
83
/* This assumes we are called from a thread with useful CPU affinity for us
84
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
85
g_free(name);
86
87
/* Wait for initialization to complete */
88
- qemu_mutex_lock(&iothread->init_done_lock);
89
while (iothread->thread_id == -1) {
90
- qemu_cond_wait(&iothread->init_done_cond,
91
- &iothread->init_done_lock);
92
+ qemu_sem_wait(&iothread->init_done_sem);
93
}
94
- qemu_mutex_unlock(&iothread->init_done_lock);
95
}
96
97
typedef struct {
98
--
99
2.20.1
100
101
diff view generated by jsdifflib
Deleted patch
1
From: Peter Xu <peterx@redhat.com>
2
1
3
In existing code we create the gcontext dynamically at the first
4
access of the gcontext from caller. That can bring some complexity
5
and potential races during using iothread. Since the context itself
6
is not that big a resource, and we won't have millions of iothread,
7
let's simply create the gcontext unconditionally.
8
9
This will also be a preparation work further to move the thread
10
context push operation earlier than before (now it's only pushed right
11
before we want to start running the gmainloop).
12
13
Removing the g_once since it's not necessary, while introducing a new
14
run_gcontext boolean to show whether we want to run the gcontext.
15
16
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
17
Signed-off-by: Peter Xu <peterx@redhat.com>
18
Message-id: 20190306115532.23025-3-peterx@redhat.com
19
Message-Id: <20190306115532.23025-3-peterx@redhat.com>
20
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
21
---
22
include/sysemu/iothread.h | 2 +-
23
iothread.c | 43 +++++++++++++++++++--------------------
24
2 files changed, 22 insertions(+), 23 deletions(-)
25
26
diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h
27
index XXXXXXX..XXXXXXX 100644
28
--- a/include/sysemu/iothread.h
29
+++ b/include/sysemu/iothread.h
30
@@ -XXX,XX +XXX,XX @@ typedef struct {
31
32
QemuThread thread;
33
AioContext *ctx;
34
+ bool run_gcontext; /* whether we should run gcontext */
35
GMainContext *worker_context;
36
GMainLoop *main_loop;
37
- GOnce once;
38
QemuSemaphore init_done_sem; /* is thread init done? */
39
bool stopping; /* has iothread_stop() been called? */
40
bool running; /* should iothread_run() continue? */
41
diff --git a/iothread.c b/iothread.c
42
index XXXXXXX..XXXXXXX 100644
43
--- a/iothread.c
44
+++ b/iothread.c
45
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
46
* We must check the running state again in case it was
47
* changed in previous aio_poll()
48
*/
49
- if (iothread->running && atomic_read(&iothread->worker_context)) {
50
+ if (iothread->running && atomic_read(&iothread->run_gcontext)) {
51
GMainLoop *loop;
52
53
g_main_context_push_thread_default(iothread->worker_context);
54
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_init(Object *obj)
55
iothread->poll_max_ns = IOTHREAD_POLL_MAX_NS_DEFAULT;
56
iothread->thread_id = -1;
57
qemu_sem_init(&iothread->init_done_sem, 0);
58
+ /* By default, we don't run gcontext */
59
+ atomic_set(&iothread->run_gcontext, 0);
60
}
61
62
static void iothread_instance_finalize(Object *obj)
63
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj)
64
qemu_sem_destroy(&iothread->init_done_sem);
65
}
66
67
+static void iothread_init_gcontext(IOThread *iothread)
68
+{
69
+ GSource *source;
70
+
71
+ iothread->worker_context = g_main_context_new();
72
+ source = aio_get_g_source(iothread_get_aio_context(iothread));
73
+ g_source_attach(source, iothread->worker_context);
74
+ g_source_unref(source);
75
+}
76
+
77
static void iothread_complete(UserCreatable *obj, Error **errp)
78
{
79
Error *local_error = NULL;
80
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
81
return;
82
}
83
84
+ /*
85
+ * Init one GMainContext for the iothread unconditionally, even if
86
+ * it's not used
87
+ */
88
+ iothread_init_gcontext(iothread);
89
+
90
aio_context_set_poll_params(iothread->ctx,
91
iothread->poll_max_ns,
92
iothread->poll_grow,
93
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
94
return;
95
}
96
97
- iothread->once = (GOnce) G_ONCE_INIT;
98
-
99
/* This assumes we are called from a thread with useful CPU affinity for us
100
* to inherit.
101
*/
102
@@ -XXX,XX +XXX,XX @@ IOThreadInfoList *qmp_query_iothreads(Error **errp)
103
return head;
104
}
105
106
-static gpointer iothread_g_main_context_init(gpointer opaque)
107
-{
108
- AioContext *ctx;
109
- IOThread *iothread = opaque;
110
- GSource *source;
111
-
112
- iothread->worker_context = g_main_context_new();
113
-
114
- ctx = iothread_get_aio_context(iothread);
115
- source = aio_get_g_source(ctx);
116
- g_source_attach(source, iothread->worker_context);
117
- g_source_unref(source);
118
-
119
- aio_notify(iothread->ctx);
120
- return NULL;
121
-}
122
-
123
GMainContext *iothread_get_g_main_context(IOThread *iothread)
124
{
125
- g_once(&iothread->once, iothread_g_main_context_init, iothread);
126
-
127
+ atomic_set(&iothread->run_gcontext, 1);
128
+ aio_notify(iothread->ctx);
129
return iothread->worker_context;
130
}
131
132
--
133
2.20.1
134
135
diff view generated by jsdifflib
Deleted patch
1
From: Peter Xu <peterx@redhat.com>
2
1
3
Since we've have the gcontext always there, create the main loop
4
altogether. The iothread_run() is even cleaner.
5
6
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
7
Signed-off-by: Peter Xu <peterx@redhat.com>
8
Message-id: 20190306115532.23025-4-peterx@redhat.com
9
Message-Id: <20190306115532.23025-4-peterx@redhat.com>
10
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11
---
12
iothread.c | 12 +++---------
13
1 file changed, 3 insertions(+), 9 deletions(-)
14
15
diff --git a/iothread.c b/iothread.c
16
index XXXXXXX..XXXXXXX 100644
17
--- a/iothread.c
18
+++ b/iothread.c
19
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
20
* changed in previous aio_poll()
21
*/
22
if (iothread->running && atomic_read(&iothread->run_gcontext)) {
23
- GMainLoop *loop;
24
-
25
g_main_context_push_thread_default(iothread->worker_context);
26
- iothread->main_loop =
27
- g_main_loop_new(iothread->worker_context, TRUE);
28
- loop = iothread->main_loop;
29
-
30
g_main_loop_run(iothread->main_loop);
31
- iothread->main_loop = NULL;
32
- g_main_loop_unref(loop);
33
-
34
g_main_context_pop_thread_default(iothread->worker_context);
35
}
36
}
37
@@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj)
38
if (iothread->worker_context) {
39
g_main_context_unref(iothread->worker_context);
40
iothread->worker_context = NULL;
41
+ g_main_loop_unref(iothread->main_loop);
42
+ iothread->main_loop = NULL;
43
}
44
qemu_sem_destroy(&iothread->init_done_sem);
45
}
46
@@ -XXX,XX +XXX,XX @@ static void iothread_init_gcontext(IOThread *iothread)
47
source = aio_get_g_source(iothread_get_aio_context(iothread));
48
g_source_attach(source, iothread->worker_context);
49
g_source_unref(source);
50
+ iothread->main_loop = g_main_loop_new(iothread->worker_context, TRUE);
51
}
52
53
static void iothread_complete(UserCreatable *obj, Error **errp)
54
--
55
2.20.1
56
57
diff view generated by jsdifflib
Deleted patch
1
From: Peter Xu <peterx@redhat.com>
2
1
3
We were pushing the context until right before running the gmainloop.
4
Now since we have everything unconditionally, we can move this
5
earlier.
6
7
One benefit is that now it's done even before init_done_sem, so as
8
long as the iothread user calls iothread_create() and completes, we
9
know that the thread stack is ready.
10
11
Signed-off-by: Peter Xu <peterx@redhat.com>
12
Message-id: 20190306115532.23025-5-peterx@redhat.com
13
Message-Id: <20190306115532.23025-5-peterx@redhat.com>
14
15
[Tweaked comment wording as discussed with Peter Xu.
16
--Stefan]
17
18
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
19
---
20
iothread.c | 9 ++++++---
21
1 file changed, 6 insertions(+), 3 deletions(-)
22
23
diff --git a/iothread.c b/iothread.c
24
index XXXXXXX..XXXXXXX 100644
25
--- a/iothread.c
26
+++ b/iothread.c
27
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
28
IOThread *iothread = opaque;
29
30
rcu_register_thread();
31
-
32
+ /*
33
+ * g_main_context_push_thread_default() must be called before anything
34
+ * in this new thread uses glib.
35
+ */
36
+ g_main_context_push_thread_default(iothread->worker_context);
37
my_iothread = iothread;
38
iothread->thread_id = qemu_get_thread_id();
39
qemu_sem_post(&iothread->init_done_sem);
40
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
41
* changed in previous aio_poll()
42
*/
43
if (iothread->running && atomic_read(&iothread->run_gcontext)) {
44
- g_main_context_push_thread_default(iothread->worker_context);
45
g_main_loop_run(iothread->main_loop);
46
- g_main_context_pop_thread_default(iothread->worker_context);
47
}
48
}
49
50
+ g_main_context_pop_thread_default(iothread->worker_context);
51
rcu_unregister_thread();
52
return NULL;
53
}
54
--
55
2.20.1
56
57
diff view generated by jsdifflib
1
From: Peter Xu <peterx@redhat.com>
1
The GNU make manual[1] demonstrates $(DESTDIR)$(bindir)/foo and QEMU
2
mostly follows that. There are just a few instances of
3
$(DESTDIR)/$(bindir)/foo. Fix these inconsistencies.
2
4
3
After consulting Paolo I know why we'd better keep the explicit
5
[1] https://www.gnu.org/software/make/manual/html_node/DESTDIR.html
4
aio_poll() in iothread_run(). Document it directly into the code so
5
that future readers will know the answer from day one.
6
6
7
Signed-off-by: Peter Xu <peterx@redhat.com>
7
Cc: Daniel P. Berrange <berrange@redhat.com>
8
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
Message-id: 20190306115532.23025-6-peterx@redhat.com
9
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
10
Message-Id: <20190306115532.23025-6-peterx@redhat.com>
10
Message-id: 20190521145318.12787-1-stefanha@redhat.com
11
Message-Id: <20190521145318.12787-1-stefanha@redhat.com>
11
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
12
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
12
---
13
---
13
iothread.c | 9 +++++++++
14
Makefile | 16 ++++++++--------
14
1 file changed, 9 insertions(+)
15
1 file changed, 8 insertions(+), 8 deletions(-)
15
16
16
diff --git a/iothread.c b/iothread.c
17
diff --git a/Makefile b/Makefile
17
index XXXXXXX..XXXXXXX 100644
18
index XXXXXXX..XXXXXXX 100644
18
--- a/iothread.c
19
--- a/Makefile
19
+++ b/iothread.c
20
+++ b/Makefile
20
@@ -XXX,XX +XXX,XX @@ static void *iothread_run(void *opaque)
21
@@ -XXX,XX +XXX,XX @@ ifneq ($(DESCS),)
21
qemu_sem_post(&iothread->init_done_sem);
22
    done
22
23
endif
23
while (iothread->running) {
24
    for s in $(ICON_SIZES); do \
24
+ /*
25
-        mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps"; \
25
+ * Note: from functional-wise the g_main_loop_run() below can
26
+        mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \
26
+ * already cover the aio_poll() events, but we can't run the
27
        $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
27
+ * main loop unconditionally because explicit aio_poll() here
28
-            "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \
28
+ * is faster than g_main_loop_run() when we do not need the
29
+            "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \
29
+ * gcontext at all (e.g., pure block layer iothreads). In
30
    done; \
30
+ * other words, when we want to run the gcontext with the
31
-    mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps"; \
31
+ * iothread we need to pay some performance for functionality.
32
+    mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps"; \
32
+ */
33
    $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \
33
aio_poll(iothread->ctx, true);
34
-        "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \
34
35
-    mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps"; \
35
/*
36
+        "$(DESTDIR)$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \
37
+    mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps"; \
38
    $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \
39
-        "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps/qemu.svg"
40
-    mkdir -p "$(DESTDIR)/$(qemu_desktopdir)"
41
+        "$(DESTDIR)$(qemu_icondir)/hicolor/scalable/apps/qemu.svg"
42
+    mkdir -p "$(DESTDIR)$(qemu_desktopdir)"
43
    $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
44
-        "$(DESTDIR)/$(qemu_desktopdir)/qemu.desktop"
45
+        "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
46
ifdef CONFIG_GTK
47
    $(MAKE) -C po $@
48
endif
36
--
49
--
37
2.20.1
50
2.21.0
38
51
39
52
diff view generated by jsdifflib