Please discard this thread, I had an issue with git send-email and patch
3-5 are missing.
Thank you,
Emanuele
On 14/06/2021 10:08, Emanuele Giuseppe Esposito wrote:
This serie of patches bring thread safety to the smaller APIs used by
block-copy, namely ratelimit, progressmeter, co-shared
smaller granularity locks to allow multiple
iothread execution in the same block device.
Signed-off-by: Emanuele Giuseppe Esposito
---
v5:
* Add comment in patch 1 to explain why we don't need _SAFE in for loop
* Move the state update (s->state = new_state) in patch 5, to maintain
the s
to handle the
yielding.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/blkdebug.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index dd82131d1e..b47c3fd97c 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -40,7 +40,6 @@
typedef struct
Add a counter for each action that a rule can trigger.
This is mainly used to keep track of how many coroutine_yield()
we need to perform after processing all rules in the list.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
lo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
block/blkdebug.c | 33 ++---
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index
Giuseppe Esposito
---
block/blkdebug.c | 49 ++--
1 file changed, 39 insertions(+), 10 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index b47c3fd97c..8b67554bec 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -38,24 +38,27
affect the existing testcases.
Use actions_count to see how many yield to issue.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/blkdebug.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block
to
true.
Based-on: <20210518094058.25952-1-eespo...@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito
---
v4:
* Introduce patch 1 (refactoring)
* Adjust to Vladimir's style comments in patch 2 [Paolo, Vladimir]
* Extend the lock to cover an additional race condition in
block_copy_
Use a local variable instead of referencing BlockCopyState through a
BlockCopyCallState or BlockCopyTask every time.
This is in preparation for next patches.
No functional change intended.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 14 --
1 file changed, 8
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 49 +-
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 3f26be8ddc..5ff7764e87 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
as an additional copy method.
While at it, store the common computation of block_copy_max_transfer
into a new field of BlockCopyState, and make sure that we always
obey max_transfer; that's more efficient even for the
COPY_RANGE_READ_WRITE case.
Signed-off-by: Emanuele Giuseppe Esposito
Signed-off
in the following patch, because are used also outside
coroutines.
Also set block_copy_task_create as coroutine_fn because:
1) it is static and only invoked by coroutine functions
2) this patch introduces and uses a CoMutex lock there
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c
By adding acquire/release pairs, we ensure that .ret and .error_is_read
fields are written by block_copy_dirty_clusters before .finished is true.
The atomic here are necessary because the fields are concurrently modified
also outside coroutines.
Signed-off-by: Emanuele Giuseppe Esposito
Moving this function in task_end ensures to update the progress
anyways, even if there is an error.
It also helps in next patch, allowing task_end to have only
one critical section.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 6
.
Signed-off-by: Emanuele Giuseppe Esposito
---
v1 -> v2:
* fix indentation [Max]
* explain why we disabled the check in QemuIoInteractive's __init__ [Max]
tests/qemu-iotests/iotests.py| 65
tests/qemu-iotests/testrunner.py | 22 +--
2 files changed,
On 11/05/2021 10:37, Paolo Bonzini wrote:
On 07/05/21 17:29, Eric Blake wrote:
+ qemu_mutex_lock(>lock);
QLIST_FOREACH(r, >suspended_reqs, next) {
if (!strcmp(r->tag, tag)) {
+ qemu_mutex_unlock(>lock);
return true;
}
}
+
On 13/05/2021 19:54, John Snow wrote:
On 4/14/21 1:03 PM, Emanuele Giuseppe Esposito wrote:
Add a new _qmp_timer field to the QEMUMachine class.
The default timer is 15 sec, as per the default in the
qmp accept() function.
Fine enough for now.
What's the exact need for this change
On 13/05/2021 20:47, John Snow wrote:
On 4/14/21 1:03 PM, Emanuele Giuseppe Esposito wrote:
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout timeout too soon.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py | 2
we want to get from shres here, after possible call to
block_copy_task_shrink(), as task->bytes may be reduced.
Ah right, I missed that. So I guess if we want the caller to protect
co-shared-resource, get_from_shres stays where it is, and put_
instead can still go into task_end (with a
With tasks and calls lock protecting all State fields,
.method is the last BlockCopyState field left unprotected.
Set it as atomic.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 37 ++---
1 file changed, 18 insertions(+), 19 deletions
On 18/05/2021 12:00, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 12:40, Emanuele Giuseppe Esposito wrote:
Progressmeter is protected by the AioContext mutex, which
is taken by the block jobs and their caller (like blockdev).
We would like to remove the dependency of block layer code
From: Paolo Bonzini
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
blockjob.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/blockjob.c b/blockjob.c
index dc1d9e0e46..22e5bb9b1f 100644
(they are also based on the first
ratelimit patch sent by Paolo), 4 covers progressmeter and
5 co-shared-resources.
Based-on: <20210503112550.478521-1-pbonz...@redhat.com>
Based-on: <20210413125533.217440-1-pbonz...@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito
---
v1 ->
onz...@redhat.com>
Based-on: <20210518094058.25952-1-eespo...@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito
---
v1 -> v2:
* More field categorized as IN/State/OUT in the various struct, better
documentation in the structs
* Fix a couple of places where I missed locks [
in block_copy_task_entry.
Also set block_copy_task_create as coroutine_fn because:
1) it is static and only invoked by coroutine functions
2) next patches will introduce and use a CoMutex lock there
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 49
Moving this function in task_end ensures to update the progress
anyways, even if there is an error.
It also helps in next patch, allowing task_end to have only
one critical section.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 6 +++---
1 file changed, 3 insertions(+), 3
By adding acquire/release pairs, we ensure that .ret and .error_is_read
fields are written by block_copy_dirty_clusters before .finished is true.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 33 ++---
1 file changed, 18 insertions(+), 15
of BlockCopyState, and make sure that we always
obey max_transfer; that's more efficient even for the
COPY_RANGE_READ_WRITE case.
Signed-off-by: Emanuele Giuseppe Esposito
Signed-off-by: Paolo Bonzini
---
block/block-copy.c | 59 ++
1 file changed, 39
.
.finished, .cancelled and reads to .ret and .error_is_read will be
protected in the following patch.
.sleep state is handled in the series "coroutine: new sleep/wake API"
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 27 +++
1 file changed, 19
s provided.
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/ratelimit.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index
co-shared-resource is currently not thread-safe, as also reported
in co-shared-resource.h. Add a QemuMutex because co_try_get_from_shres
can also be invoked from non-coroutine context.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/co-shared-resource.h | 4 +---
util/qemu-co-shared
From: Paolo Bonzini
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 28 +++-
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/block/block-copy.c b/block/block
to implement the ProgressMeter API, but keep the
struct as public, to avoid forcing allocation on the heap.
Also add a mutex to be able to provide an accurate snapshot of the
progress values to the caller.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Emanuele Giuseppe Esposito
---
block
Because the list of tasks is only modified by coroutine
functions, add a CoMutex in order to protect them.
Use the same mutex to protect also BlockCopyState in_flight_bytes
field to avoid adding additional syncronization primitives.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block
So the current plan I have for _qmp_timer is:
- As Max suggested, move it in __init__ and check there for the
wrapper contents. If we need to block forever (gdb, valgrind), we set
it to None. Otherwise to 15 seconds. I think setting it always to None
is not ideal, because if you are
On 18/05/2021 16:26, John Snow wrote:
On 5/18/21 9:58 AM, Emanuele Giuseppe Esposito wrote:
So the current plan I have for _qmp_timer is:
- As Max suggested, move it in __init__ and check there for the
wrapper contents. If we need to block forever (gdb, valgrind), we
set it to None
On 07/05/2021 17:39, Max Reitz wrote:
On 06.05.21 10:48, Emanuele Giuseppe Esposito wrote:
pylint 2.8 introduces consider-using-with error, suggesting
to use the 'with' block statement when possible.
http://pylint.pycqa.org/en/latest/whatsnew/2.8.html
Modify all subprocess.Popen calls
co-shared-resource is currently not thread-safe, as also reported
in co-shared-resource.h. Add a QemuMutex because co_try_get_from_shres
can also be invoked from non-coroutine context.
Signed-off-by: Emanuele Giuseppe Esposito
---
util/qemu-co-shared-resource.c | 26
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-copy.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index c2e5090412..7e9467d48a 100644
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
blockjob.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/blockjob.c b/blockjob.c
index dc1d9e0e46..046c1bcd66 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -300,10
to do is to add a mutex to be able to provide
an accurate snapshot of the progress values to the caller.
Signed-off-by: Emanuele Giuseppe Esposito
---
blockjob.c| 33 +
include/qemu/progress_meter.h | 31 +++
job-qmp.c
by: Emanuele Giuseppe Esposito
---
v1 -> v2:
* More field categorized as IN/State/OUT in the various struct
* Fix a couple of places where I missed locks [Vladimir, Paolo]
Emanuele Giuseppe Esposito (3):
progressmeter: protect with a mutex
co-shared-resource: protect with a mutex
a
d.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/ratelimit.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h
index 003ea6d5a3..48bf59e857 100644
--- a/include/qemu/r
Divide the fields in AioTaskPool in IN and Status, and
introduce a CoQueue instead of .wait to take care of suspending
and resuming the calling coroutine, and a lock to protect the
busy_tasks counter accesses and the AioTask .ret field.
Signed-off-by: Emanuele Giuseppe Esposito
---
block
to handle the
yielding.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 8f19d991fa..e37f999254 100644
affect the existing testcases.
Use actions_count to see how many yeld to issue.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index
Add a counter for each action that a rule can trigger.
This is mainly used to keep track of how many coroutine_yeld()
we need to perform after processing all rules in the list.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 17
execution in the same block device.
Signed-off-by: Emanuele Giuseppe Esposito
---
v1 -> v2
* Change commit message of patch 4 and cover letter
Emanuele Giuseppe Esposito (5):
blkdebug: refactor removal of a suspended request
blkdebug: move post-resume handling to resume_req_by_tag
blkde
lo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 2c0b9b0ee8..8f19d991fa 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -79
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index dffd869b32..e92a35ccbb 100644
--- a/block/blkdebug.c
+++ b
is assigned to a class field and used in other methods.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py| 63
tests/qemu-iotests/testrunner.py | 22 +--
2 files changed, 42 insertions(+), 43 deletions(-)
diff --git a/tests
execution in the same block device.
Signed-off-by: Emanuele Giuseppe Esposito
---
v2 -> v3
* Fix "yeld"->"yield" in patches 3-4 [Eric]
* Use lock guard instead of lock/unlock in patch 5 [Eric]
Emanuele Giuseppe Esposito (5):
blkdebug: refactor removal of a suspended req
| 11 ---
python/qemu/machine.py | 28 ++--
tests/qemu-iotests/iotests.py | 55 +++-
tests/qemu-iotests/testrunner.py | 1 +
4 files changed, 57 insertions(+), 38 deletions(-)
The iotests stuff was handled by Emanuele Giuseppe
affect the existing testcases.
Use actions_count to see how many yield to issue.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index
Add a counter for each action that a rule can trigger.
This is mainly used to keep track of how many coroutine_yield()
we need to perform after processing all rules in the list.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 17
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 53
1 file changed, 40 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index dffd869b32..cf8b088ce7 100644
to handle the
yielding.
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 31 ++-
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 8f19d991fa..e37f999254 100644
lo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 2c0b9b0ee8..8f19d991fa 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -79
When using -valgrind on the script tests, it generates a log file
in $TEST_DIR that is either read (if valgrind finds problems) or
otherwise deleted. Provide the same exact behavior when using
-valgrind on the python tests.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests
Reviewed-by: Max Reitz
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 7 +++
1 file changed, 7 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index a746cab745..d743e88746 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
.
This series is tested on the previous serie
"qemu-iotests: quality of life improvements"
but independent from it, so it can be applied separately.
Signed-off-by: Emanuele Giuseppe Esposito
---
v4:
* Rename environment variable from GDB_QEMU to GDB_OPTIONS
* This time test 297 (pylint) p
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/qtest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/python/qemu/qtest.py b/python/qemu/qtest.py
index afea210d9d..e6a8fb5984 100644
--- a/python/qemu/qtest.py
Attaching gdbserver implies that the qmp socket
should wait indefinitely for an answer from QEMU.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu
lgring
PID to assign to the log file name, use the "%p" flag in valgrind
log file name that automatically puts the process PID at runtime.
Reviewed-by: Max Reitz
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 7 ---
tests/qemu-iotests/iotests.py | 11 +++
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index d743e88746..1192d6489e 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -250,6 +250,10
Using the flag -p, allow the qemu binary to print to stdout.
Reviewed-by: Max Reitz
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 4 +++-
tests/qemu-iotests/iotests.py | 9 +
tests/qemu-iotests/testenv.py | 9 +++--
3 files changed, 19 insertions
-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/check | 6 +-
tests/qemu-iotests/iotests.py | 5 +
tests/qemu-iotests/testenv.py | 19 ---
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index cf1ca60376..c9628e6828 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 8144e316a4..a746cab745 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -229,6 +229,17
The priority will be given to gdb command line, meaning if the -gdb
parameter and -valgrind are given, gdb will be wrapped around
the qemu binary.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
to qemu-iotests execution.
Signed-off-by: Emanuele Giuseppe Esposito
---
python/qemu/machine.py| 7 +--
python/qemu/qtest.py | 5 +++--
tests/qemu-iotests/iotests.py | 3 ++-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/python/qemu/machine.py b/python/qemu
Introduce the "Debugging a test case" section, in preparation
to the additional flags that will be added in the next patches.
Signed-off-by: Emanuele Giuseppe Esposito
---
docs/devel/testing.rst | 8
1 file changed, 8 insertions(+)
diff --git a/docs/devel/testing.rst b/
As with gdbserver, valgrind delays the test execution, so
the default QMP socket timeout timeout too soon.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/iotests.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests
The only limitation here is that running a script with gdbserver
will make the test output mismatch with the expected
results, making the test fail.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/qemu-iotests/common.rc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
On 12/05/2021 17:44, Stefan Hajnoczi wrote:
On Mon, May 10, 2021 at 10:59:40AM +0200, Emanuele Giuseppe Esposito wrote:
co-shared-resource is currently not thread-safe, as also reported
in co-shared-resource.h. Add a QemuMutex because co_try_get_from_shres
can also be invoked from non
On 14/05/2021 16:09, Max Reitz wrote:
On 12.05.21 19:04, Max Reitz wrote:
On 10.05.21 21:04, Emanuele Giuseppe Esposito wrote:
pylint 2.8 introduces consider-using-with error, suggesting
to use the 'with' block statement when possible.
Modify all subprocess.Popen call to use
On 14/05/2021 16:26, Vladimir Sementsov-Ogievskiy wrote:
14.05.2021 17:10, Emanuele Giuseppe Esposito wrote:
On 12/05/2021 17:44, Stefan Hajnoczi wrote:
On Mon, May 10, 2021 at 10:59:40AM +0200, Emanuele Giuseppe Esposito
wrote:
co-shared-resource is currently not thread-safe, as also
On 14/05/2021 17:30, Vladimir Sementsov-Ogievskiy wrote:
14.05.2021 17:32, Emanuele Giuseppe Esposito wrote:
On 14/05/2021 16:26, Vladimir Sementsov-Ogievskiy wrote:
14.05.2021 17:10, Emanuele Giuseppe Esposito wrote:
On 12/05/2021 17:44, Stefan Hajnoczi wrote:
On Mon, May 10, 2021
On 10/05/2021 13:28, Vladimir Sementsov-Ogievskiy wrote:
10.05.2021 11:59, Emanuele Giuseppe Esposito wrote:
Progressmeter is protected by the AioContext mutex, which
is taken by the block jobs and their caller (like blockdev).
We would like to remove the dependency of block layer code
We don't have caller that pass only one pointer. So we can just do
*current = pm->current;
*total = pm->total;
implicitly requiring both pointers to be non NULL.
Is it so performance critical that we need to skip these safety checks?
IMHO we can keep it as it is.
Not performance. It's
On 26/05/2021 13:32, Vladimir Sementsov-Ogievskiy wrote:
20.05.2021 10:52, Emanuele Giuseppe Esposito wrote:
This series adds the option to attach gdbserver and valgrind
to the QEMU binary running in qemu_iotests.
It also allows to redirect QEMU binaries output of the python tests
to stick to that. If you want to send a patch changing all
-options in --options, feel free to do it in a separate series that
changes also -gdb :)
Thank you,
Emanuele
if -gdb is not provided but $GDB_OPTIONS is set, ignore the
environment variable.
Signed-off-by: Emanuele Giuseppe
On 20/05/2021 17:19, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
Because the list of tasks is only modified by coroutine
functions, add a CoMutex in order to protect them.
Use the same mutex to protect also BlockCopyState in_flight_bytes
field
On 21/05/2021 17:01, Paolo Bonzini wrote:
On 20/05/21 17:30, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
As for BlockCopyTask, add a lock to protect BlockCopyCallState
ret and sleep_state fields. Also move ret, finished and cancelled
in the OUT
On 21/05/2021 19:10, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
With tasks and calls lock protecting all State fields,
.method is the last BlockCopyState field left unprotected.
Set it as atomic.
Signed-off-by: Emanuele Giuseppe Esposito
OK
On 28/05/2021 19:16, Vladimir Sementsov-Ogievskiy wrote:
20.05.2021 10:52, Emanuele Giuseppe Esposito wrote:
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
docs/devel/testing.rst | 11 +++
1 file changed, 11 insertions(+)
diff --git
sys.exit(os.EX_USAGE)
+qemu_valgrind = []
+if os.environ.get('VALGRIND_QEMU') == "y" and \
+ os.environ.get('NO_VALGRIND') != "y":
+ valgrind_logfile = "--log-file=" + test_dir.strip()
a bit strange that you need to strip test_dir here.. Why?
Yep, it's unnecessary
+
imgfmt = os.environ.get('IMGFMT', 'raw')
imgproto = os.environ.get('IMGPROTO', 'file')
output_dir = os.environ.get('OUTPUT_DIR', '.')
@@ -614,6 +616,13 @@ def _post_shutdown(self) -> None:
super()._post_shutdown()
self.subprocess_check_valgrind(qemu_valgrind)
+
On 01/06/2021 10:39, Vladimir Sementsov-Ogievskiy wrote:
17.05.2021 17:50, Emanuele Giuseppe Esposito wrote:
Co-developed-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/blkdebug.c | 53
1 file changed, 40 insertions
On 20/05/2021 16:42, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
From: Paolo Bonzini
Put the logic to determine the copy size in a separate function, so
that there is a simple state machine for the possible methods of
copying data from one
On 20/05/2021 17:00, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
As done in BlockCopyCallState, categorize BlockCopyTask
and BlockCopyState in IN, State and OUT fields.
This is just to understand which field has to be protected with a lock
On 20/05/2021 15:47, Vladimir Sementsov-Ogievskiy wrote:
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote:
This serie of patches aims to reduce the usage of the global
AioContexlock in block-copy, by introducing smaller granularity
locks thus on making the block layer thread safe
On 26/05/2021 21:15, Vladimir Sementsov-Ogievskiy wrote:
20.05.2021 10:52, Emanuele Giuseppe Esposito wrote:
Define -gdb flag and GDB_OPTIONS environment variable
to python tests to attach a gdbserver to each qemu instance.
This patch only adds and parses this flag, it does not yet add
On 05/06/2021 15:28, Vladimir Sementsov-Ogievskiy wrote:
04.06.2021 12:17, Emanuele Giuseppe Esposito wrote:
Currently, the check script only parses the option and sets the
VALGRIND_QEMU environmental variable to "y".
Add another local python variable that prepares the co
On 05/06/2021 17:15, Vladimir Sementsov-Ogievskiy wrote:
04.06.2021 13:07, Emanuele Giuseppe Esposito wrote:
First, categorize the structure fields to identify what needs
to be protected and what doesn't.
We essentially need to protect only .state, and the 3 lists in
BDRVBlkdebugState
On 03/06/2021 01:23, John Snow wrote:
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote:
Alsp add a new _qmp_timer field to the QEMUMachine class.
Let's change the default socket timeout to None, so that if
a subclass needs to add a timer, it can be done by modifying
this private field
So, you just make the class do nothing.. I'd prefer something like this:
@contextmanager
def NoTimeout:
yield
if qemu_gdb:
Timeout = NoTimeout
I am not sure I understand what you want to do here.
I have a basic understanding of @contextmanager, but can you explain
more what you
On 26/05/2021 20:16, Vladimir Sementsov-Ogievskiy wrote:
So, the change:
-makecheck -> --makecheck
-valgrind -> --valgrind
-nocache -> --nocache
-misalign -> --misalign
Motivation:
1. Several long options are already have double dash:
--dry-run, --color, --groups,
lgrind
PID to assign to the log file name, use the "%p" flag in valgrind
log file name that automatically puts the process PID at runtime.
Signed-off-by: Emanuele Giuseppe Esposito
Reviewed-by: Max Reitz
---
tests/qemu-iotests/check | 7 ---
tests/qemu-iotests/iotests.py | 11 +++
101 - 200 of 1403 matches
Mail list logo