[Qemu-block] [PATCH v4 11/43] block: remove "qemu/osdep.h" from header file

2017-12-14 Thread Philippe Mathieu-Daudé
applied using ./scripts/clean-includes Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- block/dmg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/block/dmg.h b/block/dmg.h index b592d6fa8b..2ecf239ba5 100644 --- a/block/dmg.h +++ b/block/dmg.h @@ -26,7 +26,6 @@ #ifndef

[Qemu-block] [PATCH v4 25/43] hw/ide: remove old i386 dependency

2017-12-14 Thread Philippe Mathieu-Daudé
and remove a duplicated include Signed-off-by: Philippe Mathieu-Daudé Acked-by: John Snow --- hw/ide/ahci.c | 1 - hw/ide/cmd646.c | 1 - hw/ide/core.c | 3 +-- hw/ide/ich.c| 1 - hw/ide/isa.c| 1 - hw/ide/microdrive.c | 1 - hw/ide/pci.c| 1 - hw/ide/pii

Re: [Qemu-block] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-14 Thread Jeff Cody
On Wed, Dec 13, 2017 at 03:46:11PM -0500, John Snow wrote: > If users set an unreasonably low speed (like one byte per second), the > calculated delay may exceed many hours. While we like to punish users > for asking for stupid things, we do also like to allow users to correct > their wicked ways.

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 20:08, Peter Maydell wrote: > On 14 December 2017 at 17:33, Paolo Bonzini wrote: >> And also in software collections. For 2.12 (as part of the above "drop >> Python 2.x support" plan) > > I'm reluctant to require a non-system python on OSX to build. Oh well. I guess I can post th

Re: [Qemu-block] [Qemu-devel] [PATCH 06/14] sdhci: refactor same sysbus/pci properties into a common one

2017-12-14 Thread Alistair Francis
On Thu, Dec 14, 2017 at 10:40 AM, Philippe Mathieu-Daudé wrote: >>> /* Capabilities registers provide information on supported features of this >>> * specific host controller implementation */ >>> -static Property sdhci_pci_properties[] = { >>> +static Property sdhci_properties[] = { >>> D

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Peter Maydell
On 14 December 2017 at 17:33, Paolo Bonzini wrote: > And also in software collections. For 2.12 (as part of the above "drop > Python 2.x support" plan) I'm reluctant to require a non-system python on OSX to build. thanks -- PMM

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
>> > Is there a specific reason why adding SD Card support to libqos is not >> > possible in C? >> >> Short (joking) answer: Would you write tests/qemu-iotests/041 in C? ;) > > 041 is not a device-level test. It doesn't poke device registers, it's > a functional test. In my email I said I support

Re: [Qemu-block] [Qemu-devel] [PATCH 06/14] sdhci: refactor same sysbus/pci properties into a common one

2017-12-14 Thread Philippe Mathieu-Daudé
>> /* Capabilities registers provide information on supported features of this >> * specific host controller implementation */ >> -static Property sdhci_pci_properties[] = { >> +static Property sdhci_properties[] = { >> DEFINE_PROP_UINT32("capareg", SDHCIState, capareg, >> SDHC

Re: [Qemu-block] [PATCH v2 1/1] virtio: fix IO request length in virtio SCSI/block

2017-12-14 Thread Denis V. Lunev
On 12/14/2017 08:52 PM, Paolo Bonzini wrote: > On 14/12/2017 15:09, Denis V. Lunev wrote: >> Linux guests submit IO requests no longer than PAGE_SIZE * max_seg >> field reported by SCSI controler. Thus typical sequential read with >> 1 MB size results in the following pattern of the IO from the gue

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 17:05, Markus Armbruster wrote: > Nir Soffer writes: > >> On Thu, Dec 14, 2017 at 1:36 PM Paolo Bonzini wrote: >> >>> On 14/12/2017 10:39, Stefan Hajnoczi wrote: > # verify Card ID > data = self.bus.do_cmd(ALL_SEND_CID) > oid, pnm, ps

Re: [Qemu-block] [PATCH v2 1/1] virtio: fix IO request length in virtio SCSI/block

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 15:09, Denis V. Lunev wrote: > Linux guests submit IO requests no longer than PAGE_SIZE * max_seg > field reported by SCSI controler. Thus typical sequential read with > 1 MB size results in the following pattern of the IO from the guest: > 8,16 115754 2.766095122 2071 D

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Stefan Hajnoczi
On Thu, Dec 14, 2017 at 11:33:03AM -0300, Philippe Mathieu-Daudé wrote: > Hi Stefan, > > On 12/14/2017 06:39 AM, Stefan Hajnoczi wrote: > [...] > > Device qtests are better done in C than Python. Python is not good at > > binary I/O and porting this to Python 3 will be extra work later (Python >

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 18:22, John Snow wrote: >> Ok, shall we wait for v2 where you look at that BZ as well? > > Sure -- if the only feedback you have on this series is primarily style > and "maybe there are some more wins" I can spin a v2 to try to broaden > the scope if it looks good so far. Yeah, that'

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 17:06, John Snow wrote: >> >> And another question. After this series there is exactly one >> block_job_sleep_ns call (in block/mirror.c). Perhaps instead of >> block_job_throttle, you should refine block_job_sleep_ns? >> > Yeah, maybe? "A rose by any other name," though -- I think

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread John Snow
On 12/14/2017 12:21 PM, Paolo Bonzini wrote: > On 14/12/2017 17:06, John Snow wrote: >>> >>> And another question. After this series there is exactly one >>> block_job_sleep_ns call (in block/mirror.c). Perhaps instead of >>> block_job_throttle, you should refine block_job_sleep_ns? >>> >> Yeah

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread John Snow
On 12/14/2017 03:49 AM, Paolo Bonzini wrote: > On 14/12/2017 01:59, John Snow wrote: >> Instead of only sleeping for 0ms when we've hit a timeout, optionally >> take a longer more explicit delay_ns that always forces the sleep. >> >> Signed-off-by: John Snow >> --- >> block/mirror.c

Re: [Qemu-block] [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Markus Armbruster
Nir Soffer writes: > On Thu, Dec 14, 2017 at 1:36 PM Paolo Bonzini wrote: > >> On 14/12/2017 10:39, Stefan Hajnoczi wrote: >> >> # verify Card ID >> >> data = self.bus.do_cmd(ALL_SEND_CID) >> >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) >> >>

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Nir, On 12/14/2017 12:39 PM, Nir Soffer wrote: > On Thu, Dec 14, 2017 at 1:36 PM Paolo Bonzini > Device qtests are better done in C than Python.  Python is not good at > > binary I/O and porting this to Python 3 will be extra work later > (Python > > 2 is set for End-of-Life in

Re: [Qemu-block] [Qemu-devel] [PATCH 3/7] blockjob: create block_job_throttle

2017-12-14 Thread John Snow
On 12/14/2017 03:39 AM, Paolo Bonzini wrote: > On 14/12/2017 01:59, John Snow wrote: >> + * Yield if it has been SLICE_TIME nanoseconds since the last yield. >> + * Otherwise, check if we need to pause (and update the yield counter). > > What is the yield counter? > > Thanks, > > Paolo > Fuz

Re: [Qemu-block] [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-14 Thread John Snow
On 12/14/2017 03:38 AM, Paolo Bonzini wrote: > On 14/12/2017 01:59, John Snow wrote: >> qemu_coroutine_yield(); >> +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); > > This is not the time the job has yielded control, but the time the job > has gotten it back. Is it intend

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Nir Soffer
On Thu, Dec 14, 2017 at 1:36 PM Paolo Bonzini wrote: > On 14/12/2017 10:39, Stefan Hajnoczi wrote: > >> # verify Card ID > >> data = self.bus.do_cmd(ALL_SEND_CID) > >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) > >> self.assertEqual(oid, "XY

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Nir Soffer
On Thu, Dec 14, 2017 at 11:39 AM Stefan Hajnoczi wrote: > On Wed, Dec 13, 2017 at 06:35:51PM -0300, Philippe Mathieu-Daudé wrote: > > Hi, > > > > With this series we can now write tests using Python rather than C. > > For complex tests this can reduce the test development time, we can > focus on

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Stefan, On 12/14/2017 06:39 AM, Stefan Hajnoczi wrote: [...] > Device qtests are better done in C than Python. Python is not good at > binary I/O and porting this to Python 3 will be extra work later (Python > 2 is set for End-of-Life in 2020, see https://pythonclock.org/). > > More important

[Qemu-block] [PATCH v2 1/1] virtio: fix IO request length in virtio SCSI/block

2017-12-14 Thread Denis V. Lunev
Linux guests submit IO requests no longer than PAGE_SIZE * max_seg field reported by SCSI controler. Thus typical sequential read with 1 MB size results in the following pattern of the IO from the guest: 8,16 115754 2.766095122 2071 D R 2095104 + 1008 [dd] 8,16 115755 2.

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 10:39, Stefan Hajnoczi wrote: >> # verify Card ID >> data = self.bus.do_cmd(ALL_SEND_CID) >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) >> self.assertEqual(oid, "XY") # QEMU default >> self.assertEqual(pnm, "QEMU!") #

Re: [Qemu-block] [Qemu-devel] QEMU not honouring bootorder

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 09:48, Michal Privoznik wrote: > On 12/13/2017 10:21 PM, Paolo Bonzini wrote: >> On 11/12/2017 13:14, Michal Privoznik wrote: > qemu-system-x86_64 \ > -boot menu=on,strict=on \ > -device lsi,id=scsi0,bus=pci.0 \ > -drive > file=/var/lib/libvirt/images/fedo

Re: [Qemu-block] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-14 Thread Stefan Hajnoczi
On Thu, Dec 07, 2017 at 08:13:14PM +, Stefan Hajnoczi wrote: > v2: > * Added docs/devel/multiple-iothreads.txt doc update [Kevin] > * Added qemu-iotests 203 test case [Kevin] > * Added iothread_stop() race fix to make 203 reliable > > Patch 1 is Paolo's recursive locking removal in bdrv_ina

Re: [Qemu-block] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 03:46:11PM -0500, John Snow wrote: > If users set an unreasonably low speed (like one byte per second), the > calculated delay may exceed many hours. While we like to punish users > for asking for stupid things, we do also like to allow users to correct > their wicked ways.

Re: [Qemu-block] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 06:35:51PM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > With this series we can now write tests using Python rather than C. > For complex tests this can reduce the test development time, we can focus on > the test purposes instead of his implementation details. > > - 1,2

Re: [Qemu-block] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > They're all the same. If it actually becomes important to configure it, > it can become a job or driver property. > > Signed-off-by: John Snow > --- > block/backup.c | 1 - > block/commit.c | 2 -- > block/mirror.c

Re: [Qemu-block] [PATCH 7/7] block/backup: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Signed-off-by: John Snow > --- > block/backup.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/block/backup.c b/block/backup.c > index d71b25c017..a5ede5f643 100644 > --- a/block/backup.c > +++ b/block/backup.c > @@ -3

Re: [Qemu-block] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Instead of only sleeping for 0ms when we've hit a timeout, optionally > take a longer more explicit delay_ns that always forces the sleep. > > Signed-off-by: John Snow > --- > block/mirror.c | 4 ++-- > blockjob.c | 9

Re: [Qemu-block] [PATCH 5/7] block/commit: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Depending on the value of `speed` and how fast our backends are, > delay_ns might be 0 very, very often. This creates some warning > messages that spook users, but it's also pretty inefficient. > > Use block_job_throttle instead to yield a little more intell

Re: [Qemu-block] [PATCH 6/7] block/stream: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Signed-off-by: John Snow > --- > block/stream.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/stream.c b/block/stream.c > index e85af18c54..3ad3190387 100644 > --- a/block/stream.c > +++ b/block/stream.c > @@ -139,7 +139,7

Re: [Qemu-block] [Qemu-devel] QEMU not honouring bootorder

2017-12-14 Thread Michal Privoznik
On 12/13/2017 10:21 PM, Paolo Bonzini wrote: > On 11/12/2017 13:14, Michal Privoznik wrote: qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \

Re: [Qemu-block] [PATCH 3/7] blockjob: create block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > + * Yield if it has been SLICE_TIME nanoseconds since the last yield. > + * Otherwise, check if we need to pause (and update the yield counter). What is the yield counter? Thanks, Paolo

Re: [Qemu-block] [PATCH 1/7] blockjob: record time of last yield

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > qemu_coroutine_yield(); > +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); This is not the time the job has yielded control, but the time the job has gotten it back. Is it intended? Thanks, Paolo