[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#661318: [PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default Re: Possibility integrating newer Hyper-V paravirt drivers in squeeze?



Hi!


Mathieu Simon wrote:
ata_pIIx doesn't defer to the (much faster) paravirt storage driver when
Debian is run on Hyper-V,
or worse, we can lose the root file system when drivers switch between
storvsc and ata_piix.

As we can't use modprobe rules (as done on RHEL for this), Andy
Whitcroft has come up
with a patch for Ubuntu's 3.2-based kernel that solves the problem and
does the job on Wheezys' kernel too.*

Jonathan Nieder>>
ata_pIIx [...]
Has the topic been raised on the linux-ide@ list?


http://www.spinics.net/lists/linux-ide/msg43078.html
==
 a.. To: Jeff Garzik <jgarzik@xxxxxxxxx>, linux-ide@xxxxxxxxxxxxxxx
 b.. Subject: [PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default
 c.. From: Andy Whitcroft <apw@xxxxxxxxxxxxx>
 d.. Date: Thu, 29 Mar 2012 18:28:50 +0100
e.. Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Mike Sterling <Mike.Sterling@xxxxxxxxxxxxx>
 f.. List-id: <linux-ide.vger.kernel.org>

--------------------------------------------------------------------------------

When we are hosted on a Hyper-V hypervisor the guest disks are exposed
both via the Hyper-V paravirtualised drivers and via an emulated SATA disk
controller.  We want to use the paravirtualised drivers where possible as
they are much more performant.  The Hyper-V paravirtualised drivers only
expose the virtual hard disk devices, the CDROM/DVD devices must still
be enumerated on the virtualised SATA controller.  As we have no control
over kernel probe order for these two drivers especially when one driver
is builtin to the kernel and the other a module, we need to prevent the
ata_piix driver from claiming the disks devices by default when running
on a Hyper-V hypervisor.

When enumerating the drives look at the aquired device ID and if it
appears to be a disk device then report it as disconnected.  Limit this
behaviour to when we have detected a Hyper-V hypervisor.  Finally allow
this behaviour to be overriden via a new module parameter.

BugLink: http://bugs.launchpad.net/bugs/929545
BugLink: http://bugs.launchpad.net/bugs/942316
Signed-off-by: Andy Whitcroft <apw@xxxxxxxxxxxxx>
---
drivers/ata/ata_piix.c |   29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)

   This was discovered when doing some boot testing on a Hyper-V
   host.  Performance was found to be bad as out builtin ata_piix
   driver was grabbing the disks.  I am Cc:ing a couple of the
   Microsoft people who worked on the HV driver set as well.

   Note that the device id data is converted from device to host
   order in the caller which makes examining the data problematic.
   As this code only make sense on X86 and we know we are in
   matching order we can access the data without first fixing it.
   Alternativly we could add a new callback from the ata core
   after the code has been fixed for validation.

   Comments?

   -apw
. . .==
http://www.spinics.net/lists/linux-ide/msg43087.html
==
 a.. To: "Andy Whitcroft" <apw@xxxxxxxxxxxxx>, "Jeff Garzik" <jgarzik@xxxxxxxxx>, <linux-ide@xxxxxxxxxxxxxxx>
 b.. Subject: Re: [PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default
 c.. From: "Victor Miasnikov" <vvm@xxxxxx>
 d.. Date: Fri, 30 Mar 2012 12:14:20 +0300
e.. Cc: <linux-kernel@xxxxxxxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, "Mike Sterling" <Mike.Sterling@xxxxxxxxxxxxx>
 f.. List-id: <linux-ide.vger.kernel.org>

--------------------------------------------------------------------------------

Hi!

----- Original Message ----- From: "Andy Whitcroft" apw
Sent: Thursday, March 29, 2012 8:28 PM
Subject: [PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default

guest disks are exposed both via the Hyper-V paravirtualised drivers and via an emulated SATA disk
controller.   . . .  we need to prevent the
ata_piix driver from claiming the disks devices by default when running
on a Hyper-V hypervisor.
Yes

Thanks for patch!

  Comments?
This patch is  "UBUNTU Way" Solution described in

See
http://vvm.blog.tut.by/2012/03/29/linux-on-hyper-v-use-hv_storvsc-instead-of-ata_piix-to-handle-the-ide-disks-devices-but-not-for-the-dvd-rom-cd-rom-device-handling/
Or

http://marc.info/?l=linux-kernel&m=133302969709312&w=2
==
List: linux-kernel
Subject: Linux on Hyper-V -- use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the DVD-ROM / CD-ROM device handling) Fw: [PATCH RFC] ata_piix: ignore disks in a hyper-v guest
From: "Victor Miasnikov"
Date: 2012-03-29 14:00:05

. . .

"UBUNTU Way" Solution -- tested with
Ubuntu 12.04 LTS (Precise Pangolin) Daily Build 2012-03-13
precise-desktop-amd64.iso
, work Ok
. . .
==



i.e. "[PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default" is fully worked solution to the described problem

Best regards, Victor Miasnikov
Blog: http://vvm.blog.tut.by/
--
==


Best regards, Victor Miasnikov
Blog:  http://vvm.blog.tut.by/





Reply to: