qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com,
	ehabkost@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com,
	qemu-devel@nongnu.org, mreitz@redhat.com, pbonzini@redhat.com,
	den@virtuozzo.com
Subject: Re: [PATCH v1 3/4] tests: add virtuqueue size checking to virtio_seg_max_adjust test
Date: Thu, 30 Jan 2020 08:42:48 -0500	[thread overview]
Message-ID: <20200130084045-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200129140702.5411-4-dplotnikov@virtuozzo.com>

On Wed, Jan 29, 2020 at 05:07:01PM +0300, Denis Plotnikov wrote:
> This is due to the change in the default virtqueue_size in the
> latest machine type to improve guest disks performance.
>

Sorry what is due to the change?
 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> ---
>  tests/acceptance/virtio_seg_max_adjust.py | 33 ++++++++++++++---------
>  1 file changed, 21 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/acceptance/virtio_seg_max_adjust.py b/tests/acceptance/virtio_seg_max_adjust.py
> index 5458573138..645d69b313 100755
> --- a/tests/acceptance/virtio_seg_max_adjust.py
> +++ b/tests/acceptance/virtio_seg_max_adjust.py
> @@ -27,8 +27,10 @@ from qemu.machine import QEMUMachine
>  from avocado_qemu import Test
>  
>  #list of machine types and virtqueue properties to test
> -VIRTIO_SCSI_PROPS = {'seg_max_adjust': 'seg_max_adjust'}
> -VIRTIO_BLK_PROPS = {'seg_max_adjust': 'seg-max-adjust'}
> +VIRTIO_SCSI_PROPS = {'seg_max_adjust': 'seg_max_adjust',
> +                     'queue_size': 'virtqueue_size'}
> +VIRTIO_BLK_PROPS = {'seg_max_adjust': 'seg-max-adjust',
> +                    'queue_size': 'queue-size'}
>  
>  DEV_TYPES = {'virtio-scsi-pci': VIRTIO_SCSI_PROPS,
>               'virtio-blk-pci': VIRTIO_BLK_PROPS}
> @@ -40,7 +42,7 @@ VM_DEV_PARAMS = {'virtio-scsi-pci': ['-device', 'virtio-scsi-pci,id=scsi0'],
>                                      'driver=null-co,id=drive0,if=none']}
>  
>  
> -class VirtioMaxSegSettingsCheck(Test):
> +class VirtioPramsCheck(Test):
>      @staticmethod
>      def make_pattern(props):
>          pattern_items = ['{0} = \w+'.format(prop) for prop in props]
> @@ -72,20 +74,24 @@ class VirtioMaxSegSettingsCheck(Test):
>                  props[p[0]] = p[1]
>          return query_ok, props, error
>  
> -    def check_mt(self, mt, dev_type_name):
> +    def check_mt(self, mt, expected_props, dev_type_name):
>          with QEMUMachine(self.qemu_bin) as vm:
> -            vm.set_machine(mt["name"])
> +            vm.set_machine(mt)
>              for s in VM_DEV_PARAMS[dev_type_name]:
>                  vm.add_args(s)
>              vm.launch()
>              query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
>  
>          if not query_ok:
> -            self.fail('machine type {0}: {1}'.format(mt['name'], error))
> +            self.fail('machine type {0}: {1}'.format(mt, error))
>  
>          for prop_name, prop_val in props.items():
> -            expected_val = mt[prop_name]
> -            self.assertEqual(expected_val, prop_val)
> +            expected_val = expected_props[prop_name]
> +            msg = 'Property value mismatch for (MT: {0}, '\
> +                  'property name: {1}): expected value: "{2}" '\
> +                  'actual value: "{3}"'\
> +                  .format(mt, prop_name, expected_val, prop_val)
> +            self.assertEqual(expected_val, prop_val, msg)


Looks like an unrelated change, no?

>      @staticmethod
>      def seg_max_adjust_enabled(mt):
> @@ -120,15 +126,18 @@ class VirtioMaxSegSettingsCheck(Test):
>  
>          for dev_type in DEV_TYPES:
>              # create the list of machine types and their parameters.
> -            mtypes = list()
> +            mtypes = dict()
>              for m in machines:
>                  if self.seg_max_adjust_enabled(m):
>                      enabled = 'true'
> +                    queue_size = '256'
>                  else:
>                      enabled = 'false'
> -                mtypes.append({'name': m,
> -                               DEV_TYPES[dev_type]['seg_max_adjust']: enabled})
> +                    queue_size = '128'
> +                mtypes[m] = {
> +                    DEV_TYPES[dev_type]['seg_max_adjust']: enabled,
> +                    DEV_TYPES[dev_type]['queue_size']: queue_size }
>  
>              # test each machine type for a device type
>              for mt in mtypes:
> -                self.check_mt(mt, dev_type)
> +                self.check_mt(mt, mtypes[mt], dev_type)
> -- 
> 2.17.0



  reply	other threads:[~2020-01-30 13:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 14:06 [PATCH v1 0/4] Increase default virtqueue size to improve performance Denis Plotnikov
2020-01-29 14:06 ` [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants Denis Plotnikov
2020-01-29 17:02   ` Philippe Mathieu-Daudé
2020-01-29 17:55   ` Cornelia Huck
2020-01-30 14:56     ` Stefan Hajnoczi
2020-02-03 12:15       ` Denis Plotnikov
2020-01-30 13:38   ` Michael S. Tsirkin
2020-02-03 12:17     ` Denis Plotnikov
2020-02-03 12:51       ` Michael S. Tsirkin
2020-02-03 12:56         ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk Denis Plotnikov
2020-01-30 13:40   ` Michael S. Tsirkin
2020-02-03 12:18     ` Denis Plotnikov
2020-01-30 14:58   ` Stefan Hajnoczi
2020-02-04  9:59     ` Denis Plotnikov
2020-02-05 11:19       ` Stefan Hajnoczi
2020-02-07  8:48         ` Denis Plotnikov
2020-02-07 16:13           ` Stefan Hajnoczi
2020-02-09  7:49           ` Michael S. Tsirkin
2020-02-10 15:34             ` Denis Plotnikov
2020-02-11 10:32               ` Michael S. Tsirkin
2020-02-10 17:06             ` Stefan Hajnoczi
2021-09-08 13:17           ` Stefano Garzarella
2021-09-08 13:22             ` Stefano Garzarella
2021-09-08 15:20               ` Denis Plotnikov
2021-09-09  8:28                 ` Stefano Garzarella
2021-09-09 11:26                   ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 3/4] tests: add virtuqueue size checking to virtio_seg_max_adjust test Denis Plotnikov
2020-01-30 13:42   ` Michael S. Tsirkin [this message]
2020-02-03 12:21     ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 4/4] tests: rename virtio_seg_max_adjust to virtio_check_params Denis Plotnikov
2021-09-08 15:45   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200130084045-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=den@virtuozzo.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).