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
---
block/cow.c
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 (2):
COW: Speed up writes
COW: Extend checking allocated
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
Reviewed-by: Paolo Bonzini
---
block/
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
met
On 06/11/2013 16:17, Paolo Bonzini wrote:
Reviewed-by: Paolo Bonzini
Thanks for your help with this series!
Charlie
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 sector
blo
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
---
block/cow.c
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
Reviewed-by: Paolo Bonzini
---
block/
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 it
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 S
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
---
block/cow.c | 79 -
1 file ch
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
---
block/cow.c | 12
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
Reviewed-by: Paolo Bonzini
---
block/
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 exe
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
---
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
---
block/cow.c | 79 -
1 file ch
ll sectors 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/c
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
---
block/cow.c | 9
Sorry all, some confusion using git-publish, apologies for the spam.
Charlie
From: Gerd Hoffmann
So RAM shows up in the new etc/e820 fw_cfg file.
Cc: Andrea Arcangeli
Signed-off-by: Gerd Hoffmann
Signed-off-by: Charlie Shepherd
---
hw/i386/pc.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a653ae4
of entries can be figured from the file size.
Cc: Andrea Arcangeli
Signed-off-by: Gerd Hoffmann
Signed-off-by: Charlie Shepherd
---
hw/i386/pc.c | 39 ---
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index dee409d
ult
Antony Pavlov (1):
milkymist-uart: Use Device::realize instead of SysBusDevice::init
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
From: Gabriel Kerneis
This patch allows defining coroutine and blocking annotations with
./configure --extra-cflags instead of modifying coroutine.h.
Signed-off-by: Gabriel Kerneis
---
include/block/coroutine.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/block/coroutine.h b
erged 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 explan
From: Gabriel Kerneis
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 the former is not use
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
---
include/block/coroutine.h | 8
1 file changed, 8 insertions(+)
diff --git a
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
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
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
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 b/includ
erged 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
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
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_cac
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
---
block.c | 8
block/blkdebug.c | 4 ++--
block/blkverify.c | 4 ++--
block/bochs.c
On 29/08/2013 11:23, Stefan Hajnoczi wrote:
On Thu, Aug 29, 2013 at 12:19 PM, Anthony PERARD
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: cannot open shared object
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
---
scripts/qapi-visit.py | 12 +---
1 file changed
On 29/08/2013 11:14, Stefan Hajnoczi wrote:
On Thu, Aug 29, 2013 at 12:02 PM, Charlie Shepherd
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
File
"
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
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 `tcg_
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 an
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_sect
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
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 spe
0 1M' test.cow
Average over 3 runs: 351 Mb/s
$ 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
---
block/cow.c | 119 ++
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 im
they need in
one go, update it and then write it out, which should be much more more
efficient.
Signed-off-by: Charlie Shepherd
---
block/cow.c | 116
1 file changed, 62 insertions(+), 54 deletions(-)
diff --git a/block/cow.c b/block
Signed-off-by: Charlie Shepherd
---
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/raw.c
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
---
block.c | 12 +++-
include/block/block.h | 3 ++-
2 files changed, 5
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
---
block.c | 56
routine_fn annotations up the call chain, turn qcow2_open into a synchronous
wrapper.
Signed-off-by: Charlie Shepherd
---
block/qcow2.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index c6dc209..59c4200 10
Signed-off-by: Charlie Shepherd
---
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 | 12
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
---
block.c | 12
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
---
block.c | 37 +
1 file changed, 17
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
---
block.c | 4 ++--
block/bochs.c | 2 +-
block/cloop.c | 2 +-
block/cow.c | 4 ++--
block
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
---
include/block/coroutine.h | 4 ++--
qemu-coroutine-lock.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a
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
---
qemu-img.c
block/snapshot.c calls bdrv->open directly from a non-coroutine context.
Provide a synchronous
wrapper to ensure correctness.
Signed-off-by: Charlie Shepherd
---
block/snapshot.c | 32 +++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/bl
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
---
block.c | 106
nbd_co_* are all meant to be only be run in a coroutine context, annotate them
accordingly.
Signed-off-by: Charlie Shepherd
---
block/nbd.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index a0e3562..3e037ba 100644
--- a
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
---
include/block/coroutine.h | 8
1 file changed, 8 insertions(+)
diff --git a
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
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 in
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 QEM
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
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
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 a
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
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
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 or not to be
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
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
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 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 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 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
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
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 b/tests/test-c
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 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 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 +++
From: Charlie Shepherd
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(-)
diff --git a
From: Charlie Shepherd
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 a/include/block
igure --enable-debug --disable-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
Ch
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 convert
82 matches
Mail list logo