* [PATCH 0/5] virtio: S3 support, use PM API macro for init
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
Hello,
Turns out S3 is not different from S4 for virtio devices: the device
is assumed to be reset, so the host and guest state are to be assumed
to be out of sync upon resume. We handle the S4 case with exactly the
same scenario, so just point the suspend/resume routines to the
freeze/restore ones.
Once that is done, we also use the PM API's macro to initialise the
sleep functions.
A couple of cleanups are included: there's no need for special thaw
processing in the balloon driver, so that's addressed in patches 1 and
2.
Testing: both S3 and S4 support have been tested using these patches
using a similar method used earlier during S4 patch development: a
guest is started with virtio-blk as the only disk, a virtio network
card, a virtio-serial port and a virtio balloon device. Ping from
guest to host, dd /dev/zero to a file on the disk, and IO from the
host on the virtio-serial port, all at once, while exercising S4 and
S3 (separately) were tested. They all continue to work fine after
resume. virtio balloon values too were tested by inflating and
deflating the balloon.
Please review and apply,
Thanks,
Amit Shah (5):
virtio: balloon: Allow stats update after restore from S4
virtio: drop thaw PM operation
virtio-pci: drop restore_common()
virtio-pci: S3 support
virtio-pci: switch to PM ops macro to initialise PM functions
drivers/virtio/virtio_balloon.c | 14 -------
drivers/virtio/virtio_pci.c | 74 ++++----------------------------------
include/linux/virtio.h | 1 -
3 files changed, 8 insertions(+), 81 deletions(-)
--
1.7.7.6
^ permalink raw reply
* [PATCH 1/5] virtio: balloon: Allow stats update after restore from S4
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
In-Reply-To: <cover.1333008576.git.amit.shah@redhat.com>
There's no reason stats update after restore can't work. If a host
requested for stats, and before servicing the request, the guest entered
S4, upon restore, the stats request can still be processed and sent off
to the host.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
drivers/virtio/virtio_balloon.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 958e512..9f1bb36 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -405,14 +405,6 @@ static int virtballoon_thaw(struct virtio_device *vdev)
static int virtballoon_restore(struct virtio_device *vdev)
{
- struct virtio_balloon *vb = vdev->priv;
-
- /*
- * If a request wasn't complete at the time of freezing, this
- * could have been set.
- */
- vb->need_stats_update = 0;
-
return restore_common(vdev);
}
#endif
--
1.7.7.6
^ permalink raw reply related
* [PATCH 2/5] virtio: drop thaw PM operation
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
In-Reply-To: <cover.1333008576.git.amit.shah@redhat.com>
The thaw operation was used by the balloon driver, but after the last
commit there's no reason to have separate thaw and restore callbacks.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
drivers/virtio/virtio_balloon.c | 6 ------
drivers/virtio/virtio_pci.c | 28 +---------------------------
include/linux/virtio.h | 1 -
3 files changed, 1 insertions(+), 34 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 9f1bb36..05f0a80 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -398,11 +398,6 @@ static int restore_common(struct virtio_device *vdev)
return 0;
}
-static int virtballoon_thaw(struct virtio_device *vdev)
-{
- return restore_common(vdev);
-}
-
static int virtballoon_restore(struct virtio_device *vdev)
{
return restore_common(vdev);
@@ -426,7 +421,6 @@ static struct virtio_driver virtio_balloon_driver = {
#ifdef CONFIG_PM
.freeze = virtballoon_freeze,
.restore = virtballoon_restore,
- .thaw = virtballoon_thaw,
#endif
};
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 635e1ef..a35a402 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -773,32 +773,6 @@ static int restore_common(struct device *dev)
return ret;
}
-static int virtio_pci_thaw(struct device *dev)
-{
- struct pci_dev *pci_dev = to_pci_dev(dev);
- struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
- struct virtio_driver *drv;
- int ret;
-
- ret = restore_common(dev);
- if (ret)
- return ret;
-
- drv = container_of(vp_dev->vdev.dev.driver,
- struct virtio_driver, driver);
-
- if (drv && drv->thaw)
- ret = drv->thaw(&vp_dev->vdev);
- else if (drv && drv->restore)
- ret = drv->restore(&vp_dev->vdev);
-
- /* Finally, tell the device we're all set */
- if (!ret)
- vp_set_status(&vp_dev->vdev, vp_dev->saved_status);
-
- return ret;
-}
-
static int virtio_pci_restore(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -824,7 +798,7 @@ static const struct dev_pm_ops virtio_pci_pm_ops = {
.suspend = virtio_pci_suspend,
.resume = virtio_pci_resume,
.freeze = virtio_pci_freeze,
- .thaw = virtio_pci_thaw,
+ .thaw = virtio_pci_restore,
.restore = virtio_pci_restore,
.poweroff = virtio_pci_suspend,
};
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index d0018d2..8efd28a 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -96,7 +96,6 @@ struct virtio_driver {
void (*config_changed)(struct virtio_device *dev);
#ifdef CONFIG_PM
int (*freeze)(struct virtio_device *dev);
- int (*thaw)(struct virtio_device *dev);
int (*restore)(struct virtio_device *dev);
#endif
};
--
1.7.7.6
^ permalink raw reply related
* [PATCH 3/5] virtio-pci: drop restore_common()
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
In-Reply-To: <cover.1333008576.git.amit.shah@redhat.com>
restore_common() was shared between restore and thaw callbacks. With
thaw gone, we don't need restore_common() anymore.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
drivers/virtio/virtio_pci.c | 23 +++++++----------------
1 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index a35a402..982d6c9 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -758,33 +758,24 @@ static int virtio_pci_freeze(struct device *dev)
return ret;
}
-static int restore_common(struct device *dev)
+static int virtio_pci_restore(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
+ struct virtio_driver *drv;
int ret;
+ drv = container_of(vp_dev->vdev.dev.driver,
+ struct virtio_driver, driver);
+
ret = pci_enable_device(pci_dev);
if (ret)
return ret;
+
pci_set_master(pci_dev);
vp_finalize_features(&vp_dev->vdev);
- return ret;
-}
-
-static int virtio_pci_restore(struct device *dev)
-{
- struct pci_dev *pci_dev = to_pci_dev(dev);
- struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
- struct virtio_driver *drv;
- int ret;
-
- drv = container_of(vp_dev->vdev.dev.driver,
- struct virtio_driver, driver);
-
- ret = restore_common(dev);
- if (!ret && drv && drv->restore)
+ if (drv && drv->restore)
ret = drv->restore(&vp_dev->vdev);
/* Finally, tell the device we're all set */
--
1.7.7.6
^ permalink raw reply related
* [PATCH 4/5] virtio-pci: S3 support
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
In-Reply-To: <cover.1333008576.git.amit.shah@redhat.com>
There's no difference in supporting S3 and S4 for virtio devices: the
vqs have to be re-created as the device has to be assumed to be reset at
restore-time. Since S4 already handles this situation, we can directly
use the same code and callbacks for S3 support.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
drivers/virtio/virtio_pci.c | 24 +++---------------------
1 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 982d6c9..0fa4f85 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -720,24 +720,6 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
}
#ifdef CONFIG_PM
-static int virtio_pci_suspend(struct device *dev)
-{
- struct pci_dev *pci_dev = to_pci_dev(dev);
-
- pci_save_state(pci_dev);
- pci_set_power_state(pci_dev, PCI_D3hot);
- return 0;
-}
-
-static int virtio_pci_resume(struct device *dev)
-{
- struct pci_dev *pci_dev = to_pci_dev(dev);
-
- pci_restore_state(pci_dev);
- pci_set_power_state(pci_dev, PCI_D0);
- return 0;
-}
-
static int virtio_pci_freeze(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
@@ -786,12 +768,12 @@ static int virtio_pci_restore(struct device *dev)
}
static const struct dev_pm_ops virtio_pci_pm_ops = {
- .suspend = virtio_pci_suspend,
- .resume = virtio_pci_resume,
+ .suspend = virtio_pci_freeze,
+ .resume = virtio_pci_restore,
.freeze = virtio_pci_freeze,
.thaw = virtio_pci_restore,
.restore = virtio_pci_restore,
- .poweroff = virtio_pci_suspend,
+ .poweroff = virtio_pci_freeze,
};
#endif
--
1.7.7.6
^ permalink raw reply related
* [PATCH 5/5] virtio-pci: switch to PM ops macro to initialise PM functions
From: Amit Shah @ 2012-03-29 8:28 UTC (permalink / raw)
To: Virtualization List; +Cc: Linus Torvalds, Michael S. Tsirkin
In-Reply-To: <cover.1333008576.git.amit.shah@redhat.com>
Use the SET_SYSTEM_SLEEP_PM_OPS macro to initialise the suspend/resume
functions in the new PM API.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
drivers/virtio/virtio_pci.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 0fa4f85..2e03d41 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -768,12 +768,7 @@ static int virtio_pci_restore(struct device *dev)
}
static const struct dev_pm_ops virtio_pci_pm_ops = {
- .suspend = virtio_pci_freeze,
- .resume = virtio_pci_restore,
- .freeze = virtio_pci_freeze,
- .thaw = virtio_pci_restore,
- .restore = virtio_pci_restore,
- .poweroff = virtio_pci_freeze,
+ SET_SYSTEM_SLEEP_PM_OPS(virtio_pci_freeze, virtio_pci_restore)
};
#endif
--
1.7.7.6
^ permalink raw reply related
* Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks
From: Avi Kivity @ 2012-03-29 9:58 UTC (permalink / raw)
To: Raghavendra K T
Cc: KVM, Alan Meadows, Peter Zijlstra, Stefano Stabellini,
the arch/x86 maintainers, LKML, Konrad Rzeszutek Wilk, Andi Kleen,
Srivatsa Vaddagiri, Jeremy Fitzhardinge, H. Peter Anvin,
Attilio Rao, Ingo Molnar, Virtualization, Linus Torvalds,
Xen Devel, Stephan Diestelhorst
In-Reply-To: <4F73568D.7000703@linux.vnet.ibm.com>
On 03/28/2012 08:21 PM, Raghavendra K T wrote:
>
>>
>>
>> Looks like a good baseline on which to build the KVM
>> implementation. We
>> might need some handshake to prevent interference on the host
>> side with
>> the PLE code.
>>
>
> I think I still missed some point in Avi's comment. I agree that PLE
> may be interfering with above patches (resulting in less performance
> advantages). but we have not seen performance degradation with the
> patches in earlier benchmarks. [ theoretically since patch has very
> slight advantage over PLE that atleast it knows who should run next ].
The advantage grows with the vcpu counts and overcommit ratio. If you
have N vcpus and M:1 overcommit, PLE has to guess from N/M queued vcpus
while your patch knows who to wake up.
>
> So TODO in my list on this is:
> 1. More analysis of performance on PLE mc.
> 2. Seeing how to implement handshake to increase performance (if PLE +
> patch combination have slight negative effect).
I can think of two options:
- from the PLE handler, don't wake up a vcpu that is sleeping because it
is waiting for a kick
- look at other sources of pause loops (I guess smp_call_function() is
the significant source) and adjust them to use the same mechanism, and
ask the host to disable PLE exiting.
This can be done incrementally later.
>
> Sorry that, I could not do more analysis on PLE (as promised last time)
> because of machine availability.
>
> I 'll do some work on this and comeback. But in the meantime, I do not
> see it as blocking for next merge window.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply
* Re: [PATCH] virtio_blk: add helper function to support mass of disks naming
From: Jens Axboe @ 2012-03-29 12:03 UTC (permalink / raw)
To: Ren Mingxin
Cc: linux-scsi, kvm, Michael S. Tsirkin, LKML, virtualization,
Tejun Heo
In-Reply-To: <4F73F4E6.4060104@cn.fujitsu.com>
On 03/29/2012 07:36 AM, Ren Mingxin wrote:
> On 03/28/2012 06:58 PM, Michael S. Tsirkin wrote:
>> On Wed, Mar 28, 2012 at 02:54:43PM +0800, Ren Mingxin wrote:
>>> Hi,
>>>
>>> The current virtblk's naming algorithm just supports 26^3
>>> disks. If there are mass of virtblks(exceeding 26^3), there
>>> will be disks with the same name.
>>>
>>> According to "sd_format_disk_name()", I add function
>>> "virtblk_name_format()" for virtblk to support mass of
>>> disks.
>>>
>>> Signed-off-by: Ren Mingxin<renmx@cn.fujitsu.com>
>> Nod. This is basically what 3e1a7ff8a0a7b948f2684930166954f9e8e776fe
>> did. Except, maybe we should move this function into block core
>> instead of duplicating it? Where would be a good place to put it?
>
> Yes, this was also what I thought.
>
> How about placing the "sd_format_disk_name()"
> as "disk_name_format()" into "block/genhd.c"
> ("include/linux/genhd.h")?
Yes, that sounds like the appropriate solution (and name, and where to
put it).
--
Jens Axboe
^ permalink raw reply
* Re: [PATCH] virtio_blk: add helper function to support mass of disks naming
From: Michael S. Tsirkin @ 2012-03-29 12:46 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-scsi, kvm, LKML, virtualization, Ren Mingxin, Tejun Heo
In-Reply-To: <4F744FAB.9070403@kernel.dk>
On Thu, Mar 29, 2012 at 02:03:55PM +0200, Jens Axboe wrote:
> On 03/29/2012 07:36 AM, Ren Mingxin wrote:
> > On 03/28/2012 06:58 PM, Michael S. Tsirkin wrote:
> >> On Wed, Mar 28, 2012 at 02:54:43PM +0800, Ren Mingxin wrote:
> >>> Hi,
> >>>
> >>> The current virtblk's naming algorithm just supports 26^3
> >>> disks. If there are mass of virtblks(exceeding 26^3), there
> >>> will be disks with the same name.
> >>>
> >>> According to "sd_format_disk_name()", I add function
> >>> "virtblk_name_format()" for virtblk to support mass of
> >>> disks.
> >>>
> >>> Signed-off-by: Ren Mingxin<renmx@cn.fujitsu.com>
> >> Nod. This is basically what 3e1a7ff8a0a7b948f2684930166954f9e8e776fe
> >> did. Except, maybe we should move this function into block core
> >> instead of duplicating it? Where would be a good place to put it?
> >
> > Yes, this was also what I thought.
> >
> > How about placing the "sd_format_disk_name()"
> > as "disk_name_format()" into "block/genhd.c"
> > ("include/linux/genhd.h")?
>
> Yes, that sounds like the appropriate solution (and name, and where to
> put it).
OK, once this is posted I'll get your ack and
queue for 3.4 with other virtio fixups.
> --
> Jens Axboe
^ permalink raw reply
* Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks
From: Raghavendra K T @ 2012-03-29 18:03 UTC (permalink / raw)
To: Avi Kivity
Cc: KVM, Alan Meadows, Peter Zijlstra, Stefano Stabellini,
the arch/x86 maintainers, LKML, Konrad Rzeszutek Wilk, Andi Kleen,
Srivatsa Vaddagiri, Jeremy Fitzhardinge, H. Peter Anvin,
Attilio Rao, Ingo Molnar, Virtualization, Linus Torvalds,
Xen Devel, Stephan Diestelhorst
In-Reply-To: <4F743247.5080407@redhat.com>
On 03/29/2012 03:28 PM, Avi Kivity wrote:
> On 03/28/2012 08:21 PM, Raghavendra K T wrote:
>>
>>>
>>>
>>> Looks like a good baseline on which to build the KVM
>>> implementation. We
>>> might need some handshake to prevent interference on the host
>>> side with
>>> the PLE code.
>>>
>>
>> I think I still missed some point in Avi's comment. I agree that PLE
>> may be interfering with above patches (resulting in less performance
>> advantages). but we have not seen performance degradation with the
>> patches in earlier benchmarks. [ theoretically since patch has very
>> slight advantage over PLE that atleast it knows who should run next ].
>
> The advantage grows with the vcpu counts and overcommit ratio. If you
> have N vcpus and M:1 overcommit, PLE has to guess from N/M queued vcpus
> while your patch knows who to wake up.
>
Yes. I agree.
>>
>> So TODO in my list on this is:
>> 1. More analysis of performance on PLE mc.
>> 2. Seeing how to implement handshake to increase performance (if PLE +
>> patch combination have slight negative effect).
>
> I can think of two options:
I really like below ideas. Thanks for that!.
> - from the PLE handler, don't wake up a vcpu that is sleeping because it
> is waiting for a kick
How about, adding another pass in the beginning of kvm_vcpu_on_spin()
to check if any vcpu is already kicked. This would almost result in
yield_to(kicked_vcpu). IMO this is also worth trying.
will try above ideas soon.
> - look at other sources of pause loops (I guess smp_call_function() is
> the significant source) and adjust them to use the same mechanism, and
> ask the host to disable PLE exiting.
>
> This can be done incrementally later.
>
Yes.. this can wait a bit.
^ permalink raw reply
* Re: [PATCH 1/1] Drivers: scsi: storvsc: Properly handle errors from the host
From: Greg KH @ 2012-03-29 23:51 UTC (permalink / raw)
To: K. Y. Srinivasan
Cc: linux-kernel, devel, virtualization, ohering, jbottomley, hch,
linux-scsi
In-Reply-To: <1333065283-30484-1-git-send-email-kys@microsoft.com>
On Thu, Mar 29, 2012 at 04:54:43PM -0700, K. Y. Srinivasan wrote:
> If the host returns error for pass through commands, deal with
> appropriately. I would like to thank James for patiently helping
> me with this patch.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
> drivers/scsi/storvsc_drv.c | 20 ++++++++++++++++----
> 1 files changed, 16 insertions(+), 4 deletions(-)
As this driver is now in Linus's tree, and drivers/scsi/ is James's
area, he is the one to take them, not me.
thanks,
greg k-h
^ permalink raw reply
* [PATCH 1/1] Drivers: scsi: storvsc: Properly handle errors from the host
From: K. Y. Srinivasan @ 2012-03-29 23:54 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization, ohering, jbottomley,
hch, linux-scsi
If the host returns error for pass through commands, deal with
appropriately. I would like to thank James for patiently helping
me with this patch.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/scsi/storvsc_drv.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 83a1972..5053769 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -785,12 +785,24 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request)
/*
* If there is an error; offline the device since all
* error recovery strategies would have already been
- * deployed on the host side.
+ * deployed on the host side. However, if the command
+ * were a pass-through command deal with it appropriately.
*/
- if (vm_srb->srb_status == SRB_STATUS_ERROR)
- scmnd->result = DID_TARGET_FAILURE << 16;
- else
+ switch (vm_srb->srb_status) {
+ case SRB_STATUS_ERROR:
+ switch (scmnd->cmnd[0]) {
+ case ATA_16:
+ case ATA_12:
+ scmnd->result = DID_PASSTHROUGH << 16;
+ break;
+ default:
+ scmnd->result = DID_TARGET_FAILURE << 16;
+ }
+ break;
+ default:
scmnd->result = vm_srb->scsi_status;
+ }
+
/*
* If the LUN is invalid; remove the device.
--
1.7.4.1
^ permalink raw reply related
* [PATCH] virtio_blk: Drop unused request tracking list
From: Asias He @ 2012-03-30 3:24 UTC (permalink / raw)
To: virtualization, Rusty Russell, Michael S. Tsirkin; +Cc: kvm
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
After:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
Signed-off-by: Asias He <asias@redhat.com>
---
drivers/block/virtio_blk.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index c4a60ba..338da9a 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -29,9 +29,6 @@ struct virtio_blk
/* The disk structure for the kernel. */
struct gendisk *disk;
- /* Request tracking. */
- struct list_head reqs;
-
mempool_t *pool;
/* Process context for config space updates */
@@ -55,7 +52,6 @@ struct virtio_blk
struct virtblk_req
{
- struct list_head list;
struct request *req;
struct virtio_blk_outhdr out_hdr;
struct virtio_scsi_inhdr in_hdr;
@@ -99,7 +95,6 @@ static void blk_done(struct virtqueue *vq)
}
__blk_end_request_all(vbr->req, error);
- list_del(&vbr->list);
mempool_free(vbr, vblk->pool);
}
/* In case queue is stopped waiting for more buffers. */
@@ -184,7 +179,6 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
return false;
}
- list_add_tail(&vbr->list, &vblk->reqs);
return true;
}
@@ -408,7 +402,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}
- INIT_LIST_HEAD(&vblk->reqs);
spin_lock_init(&vblk->lock);
vblk->vdev = vdev;
vblk->sg_elems = sg_elems;
@@ -571,9 +564,6 @@ static void __devexit virtblk_remove(struct virtio_device *vdev)
vblk->config_enable = false;
mutex_unlock(&vblk->config_lock);
- /* Nothing should be pending. */
- BUG_ON(!list_empty(&vblk->reqs));
-
/* Stop all the virtqueues. */
vdev->config->reset(vdev);
--
1.7.7.6
^ permalink raw reply related
* [PATCH 0/4] block: move sd_format_disk_name() into block core as disk_name_format()
From: Ren Mingxin @ 2012-03-30 9:50 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin, Rusty Russell, Tejun Heo
Cc: VIRTUAL, LKML, SCSI, KVM
This patch series renames "sd_format_disk_name()" to
"disk_name_format()" and moves it into block core. So
that who needs formatting disk name can use it, instead
of duplicating these similar help functions.
Ren Mingxin (4):
block: add function disk_name_format() into block core
scsi: replace sd_format_disk_name() to disk_name_format()
block: replace rssd_disk_name_format() to disk_name_format()
virtio_blk: use disk_name_format() to support mass of disks naming
block/genhd.c | 49 ++++++++++++++++++++++++++++++++++++++
drivers/block/mtip32xx/mtip32xx.c | 33 -------------------------
drivers/block/virtio_blk.c | 13 ----------
drivers/scsi/sd.c | 48 -------------------------------------
include/linux/genhd.h | 2 +
5 files changed, 54 insertions(+), 91 deletions(-)
Any comment will be appreciated.
Thanks,
Ren
^ permalink raw reply
* [PATCH 1/4] block: add function disk_name_format() into block core
From: Ren Mingxin @ 2012-03-30 9:52 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin, Rusty Russell, Tejun Heo
Cc: VIRTUAL, LKML, SCSI, KVM
In-Reply-To: <4F7581D4.4040301@cn.fujitsu.com>
According to 3e1a7ff8a0a7b948f2684930166954f9e8e776fe,
I copied function "sd_format_disk_name()" into block core with
the name of "disk_name_format()".
Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
---
block/genhd.c | 49
+++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/genhd.h | 2 ++
2 files changed, 51 insertions(+)
diff --git a/block/genhd.c b/block/genhd.c
index df9816e..10c04b6 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -357,6 +357,55 @@ void unregister_blkdev(unsigned int major, const
char *name)
EXPORT_SYMBOL(unregister_blkdev);
+/*
+ * disk_name_format - format disk name
+ * @prefix: name prefix - ie. "sd" for SCSI disks
+ * @index: index of the disk to format name for
+ * @buf: output buffer
+ * @buflen: length of the output buffer
+ *
+ * Take SCSI disks for example. Disk names starts at sda. The
+ * 26th device is sdz and the 27th is sdaa. The last one for
+ * two lettered suffix is sdzz which is followed by sdaaa.
+ *
+ * This is basically 26 base counting with one extra 'nil' entry
+ * at the beginning from the second digit on and can be
+ * determined using similar method as 26 base conversion with the
+ * index shifted -1 after each digit is computed.
+ *
+ * CONTEXT:
+ * Don't care.
+ *
+ * RETURNS:
+ * 0 on success, -errno on failure.
+ */
+
+int disk_name_format(char *prefix, int index, char *buf, int buflen)
+{
+ const int base = 'z' - 'a' + 1;
+ char *begin = buf + strlen(prefix);
+ char *end = buf + buflen;
+ char *p;
+ int unit;
+
+ p = end - 1;
+ *p = '\0';
+ unit = base;
+ do {
+ if (p == begin)
+ return -EINVAL;
+ *--p = 'a' + (index % unit);
+ index = (index / unit) - 1;
+ } while (index >= 0);
+
+ memmove(begin, p, end - p);
+ memcpy(buf, prefix, strlen(prefix));
+
+ return 0;
+}
+
+EXPORT_SYMBOL(disk_name_format);
+
static struct kobj_map *bdev_map;
/**
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index e61d319..cd3d5e5 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -407,6 +407,8 @@ static inline void free_part_info(struct hd_struct
*part)
extern void part_round_stats(int cpu, struct hd_struct *part);
/* block/genhd.c */
+extern int disk_name_format(char *prefix, int index, char *buf, int
buflen);
+
extern void add_disk(struct gendisk *disk);
extern void del_gendisk(struct gendisk *gp);
extern struct gendisk *get_gendisk(dev_t dev, int *partno);
^ permalink raw reply related
* [PATCH 2/4] scsi: replace sd_format_disk_name() to disk_name_format()
From: Ren Mingxin @ 2012-03-30 9:53 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin, Rusty Russell, Tejun Heo
Cc: VIRTUAL, LKML, SCSI, KVM
In-Reply-To: <4F7581D4.4040301@cn.fujitsu.com>
Since "sd_format_disk_name()"has been copied into block
core as "disk_name_format()", the original function should
be removed, and the place used original function should be
replaced by the renamed function.
Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
---
sd.c | 48 +-----------------------------------------------
1 file changed, 1 insertion(+), 47 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 09e3df4..b82156a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2525,52 +2525,6 @@ static void sd_unlock_native_capacity(struct
gendisk *disk)
sdev->host->hostt->unlock_native_capacity(sdev);
}
-/**
- * sd_format_disk_name - format disk name
- * @prefix: name prefix - ie. "sd" for SCSI disks
- * @index: index of the disk to format name for
- * @buf: output buffer
- * @buflen: length of the output buffer
- *
- * SCSI disk names starts at sda. The 26th device is sdz and the
- * 27th is sdaa. The last one for two lettered suffix is sdzz
- * which is followed by sdaaa.
- *
- * This is basically 26 base counting with one extra 'nil' entry
- * at the beginning from the second digit on and can be
- * determined using similar method as 26 base conversion with the
- * index shifted -1 after each digit is computed.
- *
- * CONTEXT:
- * Don't care.
- *
- * RETURNS:
- * 0 on success, -errno on failure.
- */
-static int sd_format_disk_name(char *prefix, int index, char *buf, int
buflen)
-{
- const int base = 'z' - 'a' + 1;
- char *begin = buf + strlen(prefix);
- char *end = buf + buflen;
- char *p;
- int unit;
-
- p = end - 1;
- *p = '\0';
- unit = base;
- do {
- if (p == begin)
- return -EINVAL;
- *--p = 'a' + (index % unit);
- index = (index / unit) - 1;
- } while (index >= 0);
-
- memmove(begin, p, end - p);
- memcpy(buf, prefix, strlen(prefix));
-
- return 0;
-}
-
/*
* The asynchronous part of sd_probe
*/
@@ -2685,7 +2639,7 @@ static int sd_probe(struct device *dev)
goto out_put;
}
- error = sd_format_disk_name("sd", index, gd->disk_name,
DISK_NAME_LEN);
+ error = disk_name_format("sd", index, gd->disk_name, DISK_NAME_LEN);
if (error) {
sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name
length exceeded.\n");
goto out_free_index;
^ permalink raw reply related
* [PATCH 3/4] block: replace rssd_disk_name_format() to disk_name_format()
From: Ren Mingxin @ 2012-03-30 9:53 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin, Rusty Russell, Tejun Heo
Cc: VIRTUAL, LKML, SCSI, KVM
In-Reply-To: <4F7581D4.4040301@cn.fujitsu.com>
Currently, block core has been supplied "disk_name_format()", so
we should remove duplicate function "rssd_disk_name_format()"
and use the new function to format rssd disk names.
Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
---
mtip32xx.c | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c
b/drivers/block/mtip32xx/mtip32xx.c
index 8eb81c9..8950bb5 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2836,37 +2836,6 @@ static int mtip_hw_resume(struct driver_data *dd)
}
/*
- * Helper function for reusing disk name
- * upon hot insertion.
- */
-static int rssd_disk_name_format(char *prefix,
- int index,
- char *buf,
- int buflen)
-{
- const int base = 'z' - 'a' + 1;
- char *begin = buf + strlen(prefix);
- char *end = buf + buflen;
- char *p;
- int unit;
-
- p = end - 1;
- *p = '\0';
- unit = base;
- do {
- if (p == begin)
- return -EINVAL;
- *--p = 'a' + (index % unit);
- index = (index / unit) - 1;
- } while (index >= 0);
-
- memmove(begin, p, end - p);
- memcpy(buf, prefix, strlen(prefix));
-
- return 0;
-}
-
-/*
* Block layer IOCTL handler.
*
* @dev Pointer to the block_device structure.
@@ -3140,7 +3109,7 @@ static int mtip_block_initialize(struct
driver_data *dd)
if (rv)
goto ida_get_error;
- rv = rssd_disk_name_format("rssd",
+ rv = disk_name_format("rssd",
index,
dd->disk->disk_name,
DISK_NAME_LEN);
^ permalink raw reply related
* [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming
From: Ren Mingxin @ 2012-03-30 9:53 UTC (permalink / raw)
To: Jens Axboe, Michael S. Tsirkin, Rusty Russell, Tejun Heo
Cc: VIRTUAL, LKML, SCSI, KVM
In-Reply-To: <4F7581D4.4040301@cn.fujitsu.com>
The current virtblk's naming algorithm only supports 263 disks.
If there are mass of virtblks(exceeding 263), there will be disks
with the same name.
By renaming "sd_format_disk_name()" to "disk_name_format()"
and moving it into block core, virtio_blk can use this function to
support mass of disks.
Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
---
virtio_blk.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index c4a60ba..54612c2 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -442,18 +442,7 @@ static int __devinit virtblk_probe(struct
virtio_device *vdev)
q->queuedata = vblk;
- if (index < 26) {
- sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
- } else if (index < (26 + 1) * 26) {
- sprintf(vblk->disk->disk_name, "vd%c%c",
- 'a' + index / 26 - 1, 'a' + index % 26);
- } else {
- const unsigned int m1 = (index / 26 - 1) / 26 - 1;
- const unsigned int m2 = (index / 26 - 1) % 26;
- const unsigned int m3 = index % 26;
- sprintf(vblk->disk->disk_name, "vd%c%c%c",
- 'a' + m1, 'a' + m2, 'a' + m3);
- }
+ disk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
vblk->disk->major = major;
vblk->disk->first_minor = index_to_minor(index);
^ permalink raw reply related
* Re: [PATCH 0/4] block: move sd_format_disk_name() into block core as disk_name_format()
From: James Bottomley @ 2012-03-30 9:56 UTC (permalink / raw)
To: Ren Mingxin
Cc: Jens Axboe, KVM, SCSI, Michael S. Tsirkin, LKML, VIRTUAL,
Tejun Heo
In-Reply-To: <4F7581D4.4040301@cn.fujitsu.com>
On Fri, 2012-03-30 at 17:50 +0800, Ren Mingxin wrote:
>
> This patch series renames "sd_format_disk_name()" to
> "disk_name_format()" and moves it into block core. So
> that who needs formatting disk name can use it, instead
> of duplicating these similar help functions.
>
> Ren Mingxin (4):
> block: add function disk_name_format() into block core
> scsi: replace sd_format_disk_name() to disk_name_format()
These two should be a single patch so it makes it obvious to anyone
looking through the change sets that the code is merely being moved.
Other than that, everything looks fine to me.
James
^ permalink raw reply
* Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks
From: Raghavendra K T @ 2012-03-30 10:07 UTC (permalink / raw)
To: Avi Kivity
Cc: KVM, Alan Meadows, Peter Zijlstra, Stefano Stabellini,
the arch/x86 maintainers, LKML, Konrad Rzeszutek Wilk, Andi Kleen,
Srivatsa Vaddagiri, Jeremy Fitzhardinge, H. Peter Anvin,
Attilio Rao, Ingo Molnar, Virtualization, Linus Torvalds,
Xen Devel, Stephan Diestelhorst
In-Reply-To: <4F74A405.2040609@linux.vnet.ibm.com>
On 03/29/2012 11:33 PM, Raghavendra K T wrote:
> On 03/29/2012 03:28 PM, Avi Kivity wrote:
>> On 03/28/2012 08:21 PM, Raghavendra K T wrote:
> I really like below ideas. Thanks for that!.
>
>> - from the PLE handler, don't wake up a vcpu that is sleeping because it
>> is waiting for a kick
>
> How about, adding another pass in the beginning of kvm_vcpu_on_spin()
> to check if any vcpu is already kicked. This would almost result in
> yield_to(kicked_vcpu). IMO this is also worth trying.
>
> will try above ideas soon.
>
I have patch something like below in mind to try:
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index d3b98b1..5127668 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1608,15 +1608,18 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
* else and called schedule in __vcpu_run. Hopefully that
* VCPU is holding the lock that we need and will release it.
* We approximate round-robin by starting at the last boosted VCPU.
+ * Priority is given to vcpu that are unhalted.
*/
- for (pass = 0; pass < 2 && !yielded; pass++) {
+ for (pass = 0; pass < 3 && !yielded; pass++) {
kvm_for_each_vcpu(i, vcpu, kvm) {
struct task_struct *task = NULL;
struct pid *pid;
- if (!pass && i < last_boosted_vcpu) {
+ if (!pass && !vcpu->pv_unhalted)
+ continue;
+ else if (pass == 1 && i < last_boosted_vcpu) {
i = last_boosted_vcpu;
continue;
- } else if (pass && i > last_boosted_vcpu)
+ } else if (pass == 2 && i > last_boosted_vcpu)
break;
if (vcpu == me)
continue;
^ permalink raw reply related
* Re: [PATCH 0/4] block: move sd_format_disk_name() into block core as disk_name_format()
From: Ren Mingxin @ 2012-03-30 10:10 UTC (permalink / raw)
To: James Bottomley
Cc: Jens Axboe, KVM, SCSI, Michael S. Tsirkin, LKML, VIRTUAL,
Tejun Heo
In-Reply-To: <1333101375.2833.34.camel@dabdike>
Hi, James:
On 03/30/2012 05:56 PM, James Bottomley wrote:
> On Fri, 2012-03-30 at 17:50 +0800, Ren Mingxin wrote:
>> This patch series renames "sd_format_disk_name()" to
>> "disk_name_format()" and moves it into block core. So
>> that who needs formatting disk name can use it, instead
>> of duplicating these similar help functions.
>>
>> Ren Mingxin (4):
>> block: add function disk_name_format() into block core
>> scsi: replace sd_format_disk_name() to disk_name_format()
> These two should be a single patch so it makes it obvious to anyone
> looking through the change sets that the code is merely being moved.
Thank you very much for so quick checking. I'll merge these
two patches into one in the next version.
> Other than that, everything looks fine to me.
>
>
Thanks,
Ren
^ permalink raw reply
* Re: [PATCH] virtio_blk: Drop unused request tracking list
From: Stefan Hajnoczi @ 2012-03-30 10:14 UTC (permalink / raw)
To: Asias He; +Cc: Michael S. Tsirkin, kvm, virtualization
In-Reply-To: <1333077850-21717-1-git-send-email-asias@redhat.com>
On Fri, Mar 30, 2012 at 4:24 AM, Asias He <asias@redhat.com> wrote:
> Benchmark shows small performance improvement on fusion io device.
>
> Before:
> seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
> seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
> rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
> rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
>
> After:
> seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
> seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
> rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
> rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
>
> Signed-off-by: Asias He <asias@redhat.com>
> ---
> drivers/block/virtio_blk.c | 10 ----------
> 1 files changed, 0 insertions(+), 10 deletions(-)
Thanks for providing performance results. It's a bit scary that this
unused list has an impact...I'm sure we have worse things elsewhere in
the KVM storage code path.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply
* Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming
From: Asias He @ 2012-03-30 11:22 UTC (permalink / raw)
To: Ren Mingxin
Cc: Jens Axboe, KVM, SCSI, Michael S. Tsirkin, LKML, VIRTUAL,
Tejun Heo
In-Reply-To: <4F7582B0.5010609@cn.fujitsu.com>
Hi, Ren
On Fri, Mar 30, 2012 at 5:53 PM, Ren Mingxin <renmx@cn.fujitsu.com> wrote:
> The current virtblk's naming algorithm only supports 263 disks.
> If there are mass of virtblks(exceeding 263), there will be disks
> with the same name.
This fix is pretty nice. However, current virtblk's naming still
supports up to 18278 disks, no?
( index 0 -> vda, index 18277 -> vdzzz ).
> By renaming "sd_format_disk_name()" to "disk_name_format()"
> and moving it into block core, virtio_blk can use this function to
> support mass of disks.
>
> Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
> ---
> virtio_blk.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index c4a60ba..54612c2 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -442,18 +442,7 @@ static int __devinit virtblk_probe(struct virtio_device
> *vdev)
>
> q->queuedata = vblk;
>
> - if (index < 26) {
> - sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
> - } else if (index < (26 + 1) * 26) {
> - sprintf(vblk->disk->disk_name, "vd%c%c",
> - 'a' + index / 26 - 1, 'a' + index % 26);
> - } else {
> - const unsigned int m1 = (index / 26 - 1) / 26 - 1;
> - const unsigned int m2 = (index / 26 - 1) % 26;
> - const unsigned int m3 = index % 26;
> - sprintf(vblk->disk->disk_name, "vd%c%c%c",
> - 'a' + m1, 'a' + m2, 'a' + m3);
> - }
> + disk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
>
> vblk->disk->major = major;
> vblk->disk->first_minor = index_to_minor(index);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Asias He
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming
From: Tejun Heo @ 2012-03-30 15:26 UTC (permalink / raw)
To: Ren Mingxin; +Cc: Jens Axboe, SCSI, KVM, Michael S. Tsirkin, LKML, VIRTUAL
In-Reply-To: <4F7582B0.5010609@cn.fujitsu.com>
On Fri, Mar 30, 2012 at 05:53:52PM +0800, Ren Mingxin wrote:
> The current virtblk's naming algorithm only supports 263 disks.
> If there are mass of virtblks(exceeding 263), there will be disks
> with the same name.
>
> By renaming "sd_format_disk_name()" to "disk_name_format()"
> and moving it into block core, virtio_blk can use this function to
> support mass of disks.
>
> Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
I guess it's already way too late but why couldn't they have been
named vdD-P where both D and P are integers denoting disk number and
partition number? [sh]dX's were created when there weren't supposed
to be too many disks, so we had to come up with the horrible alphabet
based numbering scheme but vd is new enough. I mean, naming is one
thing but who wants to figure out which sequence is or guess what
comes next vdzz9? :(
If we're gonna move it to block layer, let's add big blinking red
comment saying "don't ever use it for any new driver".
Thanks.
--
tejun
^ permalink raw reply
* Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming
From: Tejun Heo @ 2012-03-30 15:28 UTC (permalink / raw)
To: Ren Mingxin; +Cc: Jens Axboe, SCSI, KVM, Michael S. Tsirkin, LKML, VIRTUAL
In-Reply-To: <20120330152606.GB28934@google.com>
On Fri, Mar 30, 2012 at 08:26:06AM -0700, Tejun Heo wrote:
> On Fri, Mar 30, 2012 at 05:53:52PM +0800, Ren Mingxin wrote:
> > The current virtblk's naming algorithm only supports 263 disks.
> > If there are mass of virtblks(exceeding 263), there will be disks
> > with the same name.
> >
> > By renaming "sd_format_disk_name()" to "disk_name_format()"
> > and moving it into block core, virtio_blk can use this function to
> > support mass of disks.
> >
> > Signed-off-by: Ren Mingxin <renmx@cn.fujitsu.com>
>
> I guess it's already way too late but why couldn't they have been
> named vdD-P where both D and P are integers denoting disk number and
> partition number? [sh]dX's were created when there weren't supposed
> to be too many disks, so we had to come up with the horrible alphabet
> based numbering scheme but vd is new enough. I mean, naming is one
> thing but who wants to figure out which sequence is or guess what
> comes next vdzz9? :(
>
> If we're gonna move it to block layer, let's add big blinking red
> comment saying "don't ever use it for any new driver".
And also let's make that clear in the function name - say,
format_legacy_disk_name() or something.
Thanks.
--
tejun
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox