qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 0/2] Reporting of rotation rate for disks
Date: Wed, 4 Oct 2017 13:19:54 +0100	[thread overview]
Message-ID: <20171004121954.GI17517@redhat.com> (raw)
In-Reply-To: <20171004114008.14849-1-berrange@redhat.com>

On Wed, Oct 04, 2017 at 12:40:06PM +0100, Daniel P. Berrange wrote:
> While looking at libvirt tagged questions on serverfault I saw
> someone ask how to indicate that a virtual disk is an SSD rather
> than rotating rust.
> 
> https://serverfault.com/questions/876467/how-to-add-virtual-storage-as-ssd-in-kvm
> 
> IIUC, IDE / SCSI don't really have an explicit concept of a
> disk being SSD vs HDD, but they do have a means of reporting
> the disk rotation rate and both specify that SSDs should
> report RPM==1.
> 
> Linux uses this to determine whether to set the 'rotational'
> property to 0 for the I/O queue, and also whether to allow
> the disk to contribute random entropy (only HDDs contribute).
> 
> This felt like something QEMU ought to allow the mgmt application
> to set based on the storage it is using to back the virtual block
> devices. So this series adds a 'rotation_rate' property to the
> SCSI and IDE disks, taking an RPM value per their respective
> specifications.

BTW, to verify these patches there's two ways:

  # smartctl -a /dev/sda | grep Rotation
  Rotation Rate:        15000 rpm

  # smartctl -a /dev/sdb | grep Rotation
  Rotation Rate:        Solid State Device

Before these patches, 'Rotation rate' is not reported by smartctl
at all. With these patches the default value of '0' means nothing
will be reported too. Only if set to a non-zero value will it
be reported.

Or look at kernel queue:

  # cat /sys/block/sda/queue/rotational 
  1

  # cat /sys/block/sdb/queue/rotational 
  0



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  parent reply	other threads:[~2017-10-04 12:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 11:40 [Qemu-devel] [PATCH v1 0/2] Reporting of rotation rate for disks Daniel P. Berrange
2017-10-04 11:40 ` [Qemu-devel] [PATCH v1 1/2] scsi-disk: support reporting of rotation rate Daniel P. Berrange
2017-10-04 15:44   ` Eric Blake
2017-10-04 16:49   ` Dr. David Alan Gilbert
2017-10-04 16:56     ` Daniel P. Berrange
2017-10-04 11:40 ` [Qemu-devel] [PATCH v1 2/2] ide: " Daniel P. Berrange
2017-10-04 15:45   ` Eric Blake
2017-10-04 15:57   ` John Snow
2017-10-20  8:42   ` Kevin Wolf
2017-10-20  9:02     ` Daniel P. Berrange
2017-10-23 17:17       ` John Snow
2017-10-04 12:19 ` Daniel P. Berrange [this message]
2017-10-10 10:18 ` [Qemu-devel] [PATCH v1 0/2] Reporting of rotation rate for disks Paolo Bonzini

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=20171004121954.GI17517@redhat.com \
    --to=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).