On 13/11/2013 12:59, Kevin Wolf wrote:
Am 06.11.2013 um 16:59 hat Charlie Shepherd geschrieben:
Process a whole sector's worth of COW bits by reading a sector, setting the
bits after skipping
any already set bits, then writing it out again. Make sure we only flush once
before writing
metadata
necessary check in cow_set_bits
Following on from Paolo's commits 26ae980 and 276cbc7, this patchset
implements some changes he recommended earlier which I didn't previously have
time to do while on GSoC.
Charlie Shepherd (2):
COW: Speed up writes
COW: Extend checking allocated bits to beyond one
cow_co_is_allocated() only checks one sector's worth of allocated bits
before returning. This is allowed but (slightly) inefficient, so extend
it to check all of the file's metadata sectors.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
Process a whole sector's worth of COW bits by reading a sector, setting
the bits after skipping any already set bits, then writing it out again.
Make sure we only flush once before writing metadata, and only if we
need to write metadata.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Charlie Shepherd (3):
COW: Speed up writes
COW: Extend checking allocated bits to beyond one sector
COW: Skip setting already set bits
Gerd Hoffmann (3):
pc: add etc/e820 fw_cfg file
pc: register e820 entries for ram
qxl: replace pipe signaling with bottom half
Igor Mammedov (1
though
as the number of entries can be figured from the file size.
Cc: Andrea Arcangeli aarca...@redhat.com
Signed-off-by: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
hw/i386/pc.c | 39 ---
1 file changed, 28 insertions
From: Gerd Hoffmann kra...@redhat.com
So RAM shows up in the new etc/e820 fw_cfg file.
Cc: Andrea Arcangeli aarca...@redhat.com
Signed-off-by: Gerd Hoffmann kra...@redhat.com
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
hw/i386/pc.c | 8 +---
1 file changed, 1 insertion(+), 7
Sorry all, some confusion using git-publish, apologies for the spam.
Charlie
cow_co_is_allocated() only checks one sector's worth of allocated bits before
returning. This is
allowed but (slightly) inefficient, so extend it to check all of the file's
metadata sectors.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/cow.c | 36
Process a whole sector's worth of COW bits by reading a sector, setting the
bits, then writing it
out again. Make sure we only flush once, before writing metadata.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/cow.c | 79
but in the end cow_find_streak
was sufficient, so it may not strictly be necessary.
Charlie Shepherd (3):
COW: Speed up writes
COW: Extend checking allocated bits to beyond one sector
COW: Skip setting already set bits
block/cow.c | 122
Rather than unnecessarily setting bits that are already set, re-use
cow_find_streak to find how
many bits are already set for this sector, and only set unset bits. Do this
before the flush to
avoid it if no bits need to be set at all.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
On 06/11/2013 12:29, Paolo Bonzini wrote:
Il 06/11/2013 13:23, Charlie Shepherd ha scritto:
+set = cow_find_streak(bitmap, 1, bitnum, sector_bits);
+if (set == sector_bits) {
+continue;
I think this shouldn't be a continue; these lines should be executed
cow_co_is_allocated() only checks one sector's worth of allocated bits before
returning. This is
allowed but (slightly) inefficient, so extend it to check all of the file's
metadata sectors.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
Rather than unnecessarily setting bits that are already set, re-use
cow_find_streak to find how
many bits are already set for this sector, and only set unset bits. Do this
before the flush to
avoid it if no bits need to be set at all.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Process a whole sector's worth of COW bits by reading a sector, setting the
bits, then writing it
out again. Make sure we only flush once, before writing metadata.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/cow.c | 79
v2:
- Fix bit position calculations in cow_update_bitmap
- Add necessary check in cow_set_bits
Following on from Paolo's commits 26ae980 and 276cbc7, this patchset
implements some changes he recommended earlier which I didn't previously have
time to do while on GSoC.
Charlie Shepherd (3
On 06/11/2013 13:03, Paolo Bonzini wrote:
Il 06/11/2013 13:56, Charlie Shepherd ha scritto:
Rather than unnecessarily setting bits that are already set, re-use
cow_find_streak to find how
many bits are already set for this sector, and only set unset bits. Do this
before the flush to
avoid
cow_co_is_allocated() only checks one sector's worth of allocated bits before
returning. This is
allowed but (slightly) inefficient, so extend it to check all of the file's
metadata sectors.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
Process a whole sector's worth of COW bits by reading a sector, setting the
bits after skipping
any already set bits, then writing it out again. Make sure we only flush once
before writing
metadata, and only if we need to write metadata.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
Paolo's commits 26ae980 and 276cbc7, this patchset
implements some changes he recommended earlier which I didn't previously have
time to do while on GSoC.
Charlie Shepherd (2):
COW: Speed up writes
COW: Extend checking allocated bits to beyond one sector
block/cow.c | 123
On 06/11/2013 16:17, Paolo Bonzini wrote:
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
Thanks for your help with this series!
Charlie
then I will redo
the later parts in several smaller and more manageable patchsets.
Charlie Shepherd (2):
Add an explanation of when a function should be marked coroutine_fn
Rename qemu_coroutine_self to qemu_coroutine_self_int and add an
annotated wrapper
coroutine-gthread.c | 2
Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect in
include/block/coroutine.h.
---
include/block/coroutine.h | 8
1 file changed, 8 insertions(+)
diff --git a/include/block/coroutine.h
While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, some coroutine internals need to call it from functions not annotated
as coroutine_fn, so add an annotated wrapper and rename the implementation
versions to qemu_coroutine_self_int.
---
coroutine-gthread.c
On 27/10/2013 20:37, Gabriel Kerneis wrote:
On Sun, Oct 27, 2013 at 04:23:54PM +0100, Charlie Shepherd wrote:
These patches were the first two from my GSoC series and were reasonably
straight-forward and well accepted. Gabriel and I are hoping the patches from
GSoC can be merged before I start
Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect in
include/block/coroutine.h.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
include/block/coroutine.h | 8
1 file changed, 8
While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, some coroutine internals need to call it from functions not annotated
as coroutine_fn, so add an annotated wrapper and rename the implementation
versions to qemu_coroutine_self_int.
Signed-off-by: Charlie
From: Gabriel Kerneis gabr...@kerneis.info
A blocking function is a function that must not be called in coroutine
context, for example because it might block for a long amount of time.
This annotation should be used to mark normal functions that have a
coroutine_fn counterpart, to make sure that
then I will redo
the later parts in several smaller and more manageable patchsets.
---
Changes since v3:
- Added missing sign-off.
- Added patches by Gabriel Kerneis to add blocking_fn annotation and to protect
coroutine_fn and blocking_fn with #ifndef.
Charlie Shepherd (2):
Add an explanation
From: Gabriel Kerneis gabr...@kerneis.info
This patch allows defining coroutine and blocking annotations with
./configure --extra-cflags instead of modifying coroutine.h.
Signed-off-by: Gabriel Kerneis gabr...@kerneis.info
---
include/block/coroutine.h | 4
1 file changed, 4 insertions(+)
On 06/09/2013 15:30, Gabriel Kerneis wrote:
Note that CoroCheck has been written as a plugin to CIL [5]. Contrary to
CPC, which is still somewhat of a prototype (although a pretty good
one!), CIL is a solid piece of software, packaged in both Fedora and
(very soon) Debian. CoroCheck makes use of
Hi all,
This is an attempt to do some triaging of the 18 current buildbot
failures[1].
default_ppc:
http://buildbot.b1-systems.de/qemu/builders/default_ppc/builds/729/steps/compile/logs/stdio
LINK ppc-linux-user/qemu-ppc
target-ppc/translate.o:(.text+0x53518): undefined reference to
On 29/08/2013 10:57, Charlie Shepherd wrote:
default_x86_64_rhel5:
http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel5/builds/684/steps/compile/logs/stdio
File
/home/buildbot/slave-public/default_x86_64_rhel5/build/scripts/qapi-visit.py,
line 23
full_name = name
On 29/08/2013 11:14, Stefan Hajnoczi wrote:
On Thu, Aug 29, 2013 at 12:02 PM, Charlie Shepherd
char...@ctshepherd.com wrote:
On 29/08/2013 10:57, Charlie Shepherd wrote:
default_x86_64_rhel5:
http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel5/builds/684/steps/compile/logs/stdio
The syntax `var = a if b else c` was added in Python 2.5, but QEMU has a
minimum Python version of 2.4, which chokes on this syntax. This patch
converts the new syntax to Python 2.4 compatible syntax.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
scripts/qapi-visit.py | 12
On 29/08/2013 11:23, Stefan Hajnoczi wrote:
On Thu, Aug 29, 2013 at 12:19 PM, Anthony PERARD
anthony.per...@citrix.com wrote:
On 29/08/13 10:57, Charlie Shepherd wrote:
xen40:
xen41:
xen42:
xen_unstable:
arm-softmmu/qemu-system-arm: error while loading shared libraries:
libxenstore.so.3.0
On 29/08/2013 13:11, Stefan Hajnoczi wrote:
On Fri, Aug 09, 2013 at 07:43:54PM +0200, Charlie Shepherd wrote:
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 8
block/blkdebug.c | 4 ++--
block/blkverify.c | 4 ++--
block
On 29/08/2013 13:33, Stefan Hajnoczi wrote:
On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote:
The previous patch convert all .bdrv_open functions to run from a coroutine
context. However
qcow2's open method is also called from qcow2_invalidate_cache.
bdrv_invalidate_cache
On 21/08/2013 09:14, Paolo Bonzini wrote:
Il 21/08/2013 00:53, Charlie Shepherd ha scritto:
What if nb_sectors 512 * 8?
For cow_co_is_allocated, you have the luxury of returning information
only for the fewer than nb_sectors. That is, you can set *num_same to a
smaller value than nb_sectors
On 21/08/2013 10:19, Paolo Bonzini wrote:
Il 21/08/2013 11:11, Charlie Shepherd ha scritto:
It still seems
worthwhile to me to be as efficient as possible, I guess that means
processing a sector's worth of metadata at a time?
Yes, that's what my patches do. My is_allocated and flushing
they need in
one go, update it and then write it out, which should be much more more
efficient.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/cow.c | 116
1 file changed, 62 insertions(+), 54 deletions(-)
diff --git
On 20/08/2013 14:45, Paolo Bonzini wrote:
I had very similar patches in my series to add get_block_status...
Ah, sorry if I've duplicated something you've already done. Stefan
encouraged me to contribute to an area of QEMU I found interesting and
seeing the XXX I thought I'd take a shot at
$ qemu-io -c 'read 0 100M' test.cow
Average over 3 runs: 426 Mb/s
Which is a ~300x increase in write speed and a ~10x increase in read speed.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/cow.c | 119 ++--
1 file changed
Sorry, this is not only NOT 1/2, but it should say v2, as this is also
based on merging in Paolo's similar patch in his get_block_status series.
On 20/08/2013 19:34, Charlie Shepherd wrote:
cow_co_is_allocated and cow_update_bitmap set bits by reading the relevant
word, setting the specific
On 20/08/2013 21:48, Paolo Bonzini wrote:
Il 20/08/2013 20:34, Charlie Shepherd ha scritto:
/* Return true if first block has been changed (ie. current version is
@@ -146,40 +114,82 @@ static inline int is_bit_set(BlockDriverState *bs,
int64_t bitnum)
static int coroutine_fn
Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect in
include/block/coroutine.h.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
include/block/coroutine.h | 8
1 file changed, 8
While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, some coroutine internals need to call it from functions not annotated
as coroutine_fn, so add an annotated wrapper and rename the implementation
versions to qemu_coroutine_self_int.
Signed-off-by: Charlie
nbd_co_* are all meant to be only be run in a coroutine context, annotate them
accordingly.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/nbd.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index a0e3562
Now that .bdrv_co_read and .bdrv_co_write are only called in a coroutine
context, convert their callers in block.c to be coroutine only, and add
bdrv_sync_* versions for synchronous callers.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 106
block/snapshot.c calls bdrv-open directly from a non-coroutine context.
Provide a synchronous
wrapper to ensure correctness.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/snapshot.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff
qemu-img doesn't run in a coroutine context, but uses block layer functions
which do need to run in a coroutine context. This patch converts qemu-img to
run the various qemu-img functions in a coroutine context correctly.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
qemu-img.c | 54
qemu_co_rwlock_rdlock and qemu_co_rwlock_wrlock can only run in a coroutine
context, so annotate them with coroutine_fn.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
include/block/coroutine.h | 4 ++--
qemu-coroutine-lock.c | 4 ++--
2 files changed, 4 insertions(+), 4
Convert .bdrv_write and .bdrv_read to coroutine functions and rename them to
.bdrv_co_write and
.bdrv_co_read.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 4 ++--
block/bochs.c | 2 +-
block/cloop.c | 2 +-
block/cow.c
A number of functions in block.c pass an RwCo struct to a coroutine entry point
in order to
synchronise an asynchronous function. This patch factors this pattern out into
a function.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 37
This patch renames the coroutine only bdrv_co_flush to bdrv_flush and the
original bdrv_flush to bdrv_sync_flush. bdrv_sync_flush is synchronous only.
This patch also converts a caller in block/mirror.c to coroutine_fn.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 8
block/blkdebug.c | 4 ++--
block/blkverify.c | 4 ++--
block/bochs.c | 4 ++--
block/cloop.c | 4 ++--
block/cow.c | 4 ++--
block/curl.c
annotations up the call chain, turn qcow2_open into a synchronous
wrapper.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block/qcow2.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index c6dc209
This patch converts bdrv_create, bdrv_create_file and bdrv_img_create to be
coroutine only functions. It adds a synchronous wrapper, bdrv_sync_create, for
any synchronous callers.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 56
This patch renames the coroutine only bdrv_co_discard to bdrv_discard and the
original
bdrv_discard to bdrv_sync_discard. bdrv_sync_discard is synchronous only.
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 12 +++-
include/block/block.h | 3 ++-
2
Signed-off-by: Charlie Shepherd char...@ctshepherd.com
---
block.c | 4 ++--
block/cow.c | 4 ++--
block/qcow.c | 4 ++--
block/qcow2.c | 4 ++--
block/qed.c | 4 ++--
block/raw-posix.c | 14 +++---
block
On 08/08/2013 07:16, Gabriel Kerneis wrote:
On Thu, Aug 08, 2013 at 02:29:39AM +0100, Charlie Shepherd wrote:
On 07/08/2013 23:13, Gabriel Kerneis wrote:
On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote:
I guess the practical problem is that CPC will get
upset that it's being
On 08/08/2013 08:15, Kevin Wolf wrote:
Am 08.08.2013 um 03:22 hat Charlie Shepherd geschrieben:
On 06/08/2013 10:37, Kevin Wolf wrote:
Against which tree is this? It didn't apply on top of qemu-git master,
nor on my block branch.
Sorry, just to clarify, this isn't based on QEMU
On 08/08/2013 09:28, Stefan Hajnoczi wrote:
On Thu, Aug 08, 2013 at 03:23:14AM +0100, Charlie Shepherd wrote:
This patch's commit message will say Test coroutine execution order
(v2) when applied.
In the future please put the v2 into the [PATCH ...] tag list instead
so it gets stripped
On 06/08/2013 10:24, Kevin Wolf wrote:
Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben:
This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of
struct BlockDriver
to be explicitly annotated as coroutine_fn, rather than yielding dynamically
depending on whether
On 06/08/2013 10:36, Kevin Wolf wrote:
Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben:
This patch follows on from the previous one and converts some block layer
functions to be
explicitly annotated with coroutine_fn instead of yielding depending upon
calling context.
---
block.c
On 05/08/2013 21:15, Gabriel Kerneis wrote:
On Mon, Aug 05, 2013 at 08:44:07PM +0200, Charlie Shepherd wrote:
This patch updates the callers of block layer functions converted to explicit
coroutine_fn annotation in the previous patch.
It looks like this patch is made of three parts:
- updating
On 06/08/2013 09:39, Stefan Hajnoczi wrote:
On Mon, Aug 05, 2013 at 08:44:03PM +0200, Charlie Shepherd wrote:
From: Charlie Shepherd cs...@cam.ac.uk
Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect
On 06/08/2013 10:37, Kevin Wolf wrote:
Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben:
This patch series is a follow up to a previous RFC about converting functions
that dynamically yield execution depending on whether they are in executing in
a coroutine context
On 07/08/2013 20:18, Stefan Hajnoczi wrote:
On Mon, Aug 05, 2013 at 08:44:04PM +0200, Charlie Shepherd wrote:
From: Charlie Shepherd cs...@cam.ac.uk
While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, it cannot actually yield execution itself, so remove
On 07/08/2013 23:13, Gabriel Kerneis wrote:
On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote:
I guess the practical problem is that CPC will get
upset that it's being called by the coroutine implementation from
non-coroutine contexts.
But is it really the case? If Charlie added
On 07/08/2013 20:30, Stefan Hajnoczi wrote:
On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote:
On 05/08/2013 20:23, Gabriel Kerneis wrote:
On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote:
diff --git a/include/block/coroutine_int.h b/include/block
-werror
--target-list=x86_64-softmmu --cc=$CPC
--extra-cflags=--noMakeStaticGlobal --useLogicalOperators --useCaseRange
--save-temps -U__SSE2__ -w -Dcoroutine_fn='__attribute__((__cps__))'
--docpsInference --warnall
$ make
Charlie Shepherd (5):
Add an explanation of when
From: Charlie Shepherd cs...@cam.ac.uk
Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect in
include/block/coroutine.h.
---
include/block/coroutine.h | 3 +++
1 file changed, 3 insertions(+)
diff --git
From: Charlie Shepherd cs...@cam.ac.uk
While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, it cannot actually yield execution itself, so remove the coroutine_fn
annotation.
---
include/block/coroutine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion
This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of
struct BlockDriver
to be explicitly annotated as coroutine_fn, rather than yielding dynamically
depending on whether
they are executed in a coroutine context or not.
---
block.c | 16
This patch follows on from the previous one and converts some block layer
functions to be
explicitly annotated with coroutine_fn instead of yielding depending upon
calling context.
---
block.c | 235 ++
block/mirror.c| 4 +-
This patch updates the callers of block layer functions converted to explicit
coroutine_fn annotation in the previous patch.
---
block/bochs.c| 4 ++--
block/cloop.c| 4 ++--
block/cow.c | 8 +++
block/dmg.c | 8 +++
block/qcow.c
This patch adds a test for coroutine execution order in test-coroutine - this
catches a bug in the CPC coroutine implementation.
---
tests/test-coroutine.c | 54 ++
1 file changed, 54 insertions(+)
diff --git a/tests/test-coroutine.c
On 05/08/2013 19:44, Charlie Shepherd wrote:
In order to compile the tree with CPC:
$ git clone git://github.com/kerneis/cpc.git
$ cd cpc
$ make
$ ./configure
$ make
$ cd ..
$ export CPC=$(pwd)/cpc/bin/cpc
$ cd qemu
$ mkdir -p bin/cpc
$ cd bin/cpc
$ ../../configure
On 05/08/2013 20:23, Gabriel Kerneis wrote:
On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote:
This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of
struct BlockDriver
to be explicitly annotated as coroutine_fn, rather than yielding dynamically
This patch makes bdrv_flush a synchronous function and updates any callers from
a coroutine context to use bdrv_co_flush instead.
The motivation for this patch comes from the GSoC Continuation-Passing C
project. When coroutines were introduced, synchronous functions in the block
layer were
82 matches
Mail list logo