On 23/07/2015 22:10, Peter Maydell wrote:
>> > The series looks good, but I'd prefer (especially for patch 4 which is
>> > in a fast path) if pow2ceil and pow2floor were made inline.
> Yeah, I was wondering if I was going to be asked to do that.
> Note that qemu_fls() is/was *not* inline, though,
On 23 July 2015 at 17:54, Paolo Bonzini wrote:
>
>
> On 23/07/2015 13:08, Peter Maydell wrote:
>> We have a qemu_fls() function which is just a silly wrapper
>> around clz32() and which is used in only a handful of places
>> in the codebase. It turns out that all of those are really
>> trying to r
On 23/07/2015 13:08, Peter Maydell wrote:
> We have a qemu_fls() function which is just a silly wrapper
> around clz32() and which is used in only a handful of places
> in the codebase. It turns out that all of those are really
> trying to round up or down to a power of 2, which is something
> we
Stefan Hajnoczi writes:
> v3:
> * Fix Patch 2 commit description because the mention of raw-posix.c ignored
>Windows [Markus]
> * Drop #ifdef CONFIG_LINUX_AIO from qemu-nbd.c
No fishy uses of CONFIG_LINUX_AIO left.
Series
Reviewed-by: Markus Armbruster
On Thu, Jul 23, 2015 at 04:14:36PM +0800, Jason Wang wrote:
>
>
> On 07/22/2015 05:36 PM, Michael S. Tsirkin wrote:
> > Virtio 1 requires this,
>
> I think you mean transitional not virtio 1?
>
> > and all devices are clean by now,
> > so let's do it!
> >
> > Exceptions:
> > - virtio-blk
>
On Thu, Jul 23, 2015 at 12:15:22PM +0200, Christian Borntraeger wrote:
> Am 22.07.2015 um 11:36 schrieb Michael S. Tsirkin:
> > Virtio 1 requires this, and all devices are clean by now,
> > so let's do it!
> >
> > Exceptions:
> > - virtio-blk
> > - compat machine types
>
> Is this targett
The --aio=MODE option enables Linux AIO or Windows overlapped I/O.
The #ifdef CONFIG_LINUX_AIO was a layering violation that also prevented
Windows overlapped I/O from being used.
Now that raw-posix.c prints an error when Linux AIO has not been
compiled in, we can unconditionally compile the opti
raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
It is confusing when aio=native performance is identical to aio=threads
because the binary was accidentally built without libaio.
Print a deprecation warning if -drive aio=native is used with a binary
that does not support li
v3:
* Fix Patch 2 commit description because the mention of raw-posix.c ignored
Windows [Markus]
* Drop #ifdef CONFIG_LINUX_AIO from qemu-nbd.c
v2:
* Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business
[Kevin]
* Print the warning in the same way as the aio=native,cach
CONFIG_LINUX_AIO is an implementation detail of raw-posix.c. Don't
mention CONFIG_LINUX_AIO in blockdev.c. Let block drivers decide what
to do with BDRV_O_NATIVE_AIO. They may print an error if it is
unsupported.
Signed-off-by: Stefan Hajnoczi
---
blockdev.c | 2 --
1 file changed, 2 deletion
On Thu, Jul 23, 2015 at 10:03:32AM +0200, Markus Armbruster wrote:
> Stefan Hajnoczi writes:
>
> > v2:
> > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business
> >[Kevin]
> > * Print the warning in the same way as the aio=native,cache.direct=off
> >deprecation warni
Am 23.07.2015 um 12:09 hat Christian Borntraeger geschrieben:
> Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi:
> > raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
> > It is confusing when aio=native performance is identical to aio=threads
> > because the binary was acciden
On Thu, 07/23 10:15, Paolo Bonzini wrote:
>
>
> On 23/07/2015 08:32, Fam Zheng wrote:
> >
> > What is realized in this series is similar except the "disable, poll,
> > enable"
> > method, instead the bit mask of interesting client types is passed to
> > aio_poll() (to be exact, passed to aio_po
We have a qemu_fls() function which is just a silly wrapper
around clz32() and which is used in only a handful of places
in the codebase. It turns out that all of those are really
trying to round up or down to a power of 2, which is something
we have utility functions for. This series replaces all
Use the utility function pow2ceil() for rounding up to the next
largest power of 2, rather than inline calculation.
Signed-off-by: Peter Maydell
---
hw/virtio/virtio-pci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index
Use pow2floor() to round down to the nearest power of 2,
rather than an inline calculation.
Signed-off-by: Peter Maydell
---
exec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/exec.c b/exec.c
index 7d60e15..4710e2d 100644
--- a/exec.c
+++ b/exec.c
@@ -2371,9 +2371,7 @@
A couple of places in hw/pci use an inline calculation to round a
size up to the next largest power of 2. We have a utility routine
for this, so use it.
(The behaviour of the old code is different if the size value
is 0 -- it would leave it as 0 rather than rounding up to 1,
but in both cases we k
Nothing uses qemu_fls() any more, so delete it.
Signed-off-by: Peter Maydell
---
include/qemu-common.h | 1 -
util/cutils.c | 5 -
2 files changed, 6 deletions(-)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 237d654..bc6f8f8 100644
--- a/include/qemu-common.h
+++
On 23/07/2015 13:08, Peter Maydell wrote:
> We have a qemu_fls() function which is just a silly wrapper
> around clz32() and which is used in only a handful of places
> in the codebase. It turns out that all of those are really
> trying to round up or down to a power of 2, which is something
> we
Use pow2ceil() to round up to the next power of 2, rather
than an inline calculation.
Signed-off-by: Peter Maydell
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 40d4880..5da41b2 100644
--- a/hw/block/nvme.c
+++ b/h
On Wed, 22 Jul 2015 12:36:22 +0300
"Michael S. Tsirkin" wrote:
> Virtio 1 requires this, and all devices are clean by now,
> so let's do it!
>
> Exceptions:
> - virtio-blk
> - compat machine types
>
> Signed-off-by: Michael S. Tsirkin
> ---
>
> Untested - consider this pseudo-code - i
On 07/23/2015 01:09 PM, Christian Borntraeger wrote:
Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi:
raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
It is confusing when aio=native performance is identical to aio=threads
because the binary was accidentally built without
Am 22.07.2015 um 11:36 schrieb Michael S. Tsirkin:
> Virtio 1 requires this, and all devices are clean by now,
> so let's do it!
>
> Exceptions:
> - virtio-blk
> - compat machine types
Is this targetted for 2.4 or 2.5? Pushing all the 1.0 stuff in 2.4 while
in hard freeze seems a bit dang
Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi:
> raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
> It is confusing when aio=native performance is identical to aio=threads
> because the binary was accidentally built without libaio.
>
> Print a deprecation warning if -drive
On 23/07/2015 10:03, Markus Armbruster wrote:
>
>> > v2:
>> > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business
>> >[Kevin]
>> > * Print the warning in the same way as the aio=native,cache.direct=off
>> >deprecation warning [Kevin]
>> >
>> > Open question: what
It is important to include this for any blocking poll, on the other hand it is
also OK to exclude it otherwise.
Signed-off-by: Fam Zheng
---
aio-posix.c | 3 +++
aio-win32.c | 3 +++
async.c | 4 ++--
include/block/aio.h | 1 +
4 files changed, 9 insertions(+), 2 dele
The "protocol" type includes all the fd handlers and event notifiers used by
block layer, especially those that should be polled in a nested event loop.
Signed-off-by: Fam Zheng
---
block/curl.c| 8
block/iscsi.c | 4 ++--
block/linux-aio.c | 4 ++--
block/nbd-client.
So we could distinguish it from "protocol" to avoid handling in nested aio
polls.
Signed-off-by: Fam Zheng
---
include/block/aio.h | 1 +
nbd.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/block/aio.h b/include/block/aio.h
index 1895a74..088f9ce
This call is introduced simply as a wrapper of aio_poll, but it makes it
is easy to change the polled client types.
Signed-off-by: Fam Zheng
---
block/io.c| 5 +
include/block/block.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/block/io.c b/block/io.c
index d4bc83b..fb
On 07/22/2015 05:36 PM, Michael S. Tsirkin wrote:
> Virtio 1 requires this,
I think you mean transitional not virtio 1?
> and all devices are clean by now,
> so let's do it!
>
> Exceptions:
> - virtio-blk
> - compat machine types
>
> Signed-off-by: Michael S. Tsirkin
> ---
>
> Unteste
Just a manual search and replace. No semantic change here.
Signed-off-by: Fam Zheng
---
block.c | 2 +-
block/curl.c | 2 +-
block/io.c| 18 +-
block/nfs.c | 2 +-
block/qed-table.c | 8
blockjob.c| 2 +-
qemu-img.c| 2 +
This new API will allow limiting the scope of polled fds. The parameter
client_mask is a bit mask of the polled client types.
Signed-off-by: Fam Zheng
---
aio-posix.c | 19 ++-
include/block/aio.h | 11 ++-
2 files changed, 24 insertions(+), 6 deletions(-)
diff -
Stefan Hajnoczi writes:
> v2:
> * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business
>[Kevin]
> * Print the warning in the same way as the aio=native,cache.direct=off
>deprecation warning [Kevin]
>
> Open question: what about the Windows case? We now pass the
> FIL
Am 23.07.2015 um 10:08 hat Paolo Bonzini geschrieben:
>
>
> On 23/07/2015 10:03, Markus Armbruster wrote:
> >
> >> > v2:
> >> > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's
> >> > business
> >> >[Kevin]
> >> > * Print the warning in the same way as the aio=native,cache
On 23/07/2015 08:32, Fam Zheng wrote:
>
> What is realized in this series is similar except the "disable, poll, enable"
> method, instead the bit mask of interesting client types is passed to
> aio_poll() (to be exact, passed to aio_poll_clients()). That is because,
> aio_poll may release the Ai
Am 23.07.2015 um 08:47 hat Markus Armbruster geschrieben:
> Alberto Garcia writes:
>
> > I've been debugging a couple of problems related to the recently
> > merged bdrv_reopen() overhaul code.
> >
> > 1. bs->children is not updated correctly
> >
> > The p
Stefan Hajnoczi writes:
> CONFIG_LINUX_AIO is an implementation detail of raw-posix.c. Don't
> mention CONFIG_LINUX_AIO in blockdev.c. Let raw-posix.c decide what to
To be precise: "raw-posix.c or raw-win32.c", or maybe "the block
driver".
> do with BDRV_O_NATIVE_AIO if CONFIG_LINUX_AIO is no
37 matches
Mail list logo