Patchwork DMA doesn't work since "make ata port as parent device of scsi host"

login
register
mail settings
Submitter Lin Ming
Date March 15, 2012, 8:19 a.m.
Message ID <1331799598.3436.46.camel@minggr>
Download mbox | patch
Permalink /patch/146849/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Lin Ming - March 15, 2012, 8:19 a.m.
On Thu, 2012-03-15 at 08:48 +0100, Jörg Sommer wrote:
> Lin Ming hat am Thu 15. Mar, 11:26 (+0800) geschrieben:
> > On Thu, 2012-03-15 at 09:59 +0800, Lin Ming wrote:
> > > On Thu, 2012-03-15 at 02:48 +0100, Jörg Sommer wrote:
> > > > Hi,
> > > > 
> > > > I'm getting these messages in a KVM virtualized host and the access to
> > > > the disks is very slow. Using libata.dma=0 suppresses the warnings, but
> > > > the disks are still slow.
> > > 
> > > Hi Jörg,
> > > 
> > > Let me try to reproduce this issue first.
> > 
> > I tried below commands on x86_32, but can't reproduce it.
> > 
> > qemu-system-i386 -kernel /root/vmlinuz-3.3.0-rc7 -append "root=/dev/sda1
> > zcache" -hda /root/debian-32.img -hdb /root/data.img
> > 
> > Maybe because i386 uses different ata controller than ppc(ata_piix vs
> > pata-macio).
> > 
> > I'll try qemu-system-ppc.
> > 
> > Did you need to run some workload to trigger these warings?
> > Or did you get these warnings right after booting the VM?
> 
> These warnings come up before »INIT started«. I don't have to do
> anything, just wait and see.
> 
> # truncate -s100M /mnt/data/new
> # mke2fs -Fq /mnt/data/new
> # mount -o loop /mnt/data/new /mnt/other
> # cp --parents /bin/zsh-static /mnt/other/zsh
> # umount /mnt/other
> # qemu-system-ppc -enable-kvm -M mac99 -cpu G4 -k de -kernel /boot/vmlinuz-3.3.0-rc5-04520-g8d233c0 -append 'root=/dev/sda ro console=ttyPZ0 init=/zsh' -hda /mnt/data/new
> 
> I've uploaded my config and the kernel:
> http://alioth.debian.org/~jo-guest/config-3.3.0-rc5-04520-g8d233c0
> http://alioth.debian.org/~jo-guest/vmlinuz-3.3.0-rc5-04520-g8d233c0
> 
> You have to switch to the serial console (Ctrl-Alt-3 or with -nographic
> Ctrl-a c). All kernel messages arrive there.
> 
> > Would you please try to disable ata port runtime pm?
> > You can disable it by, for example,
> 
> Is this also possible with a kernel parameter? It takes very long until I
> get a shell prompt.

No, but you can try below debug patch to disable port runtime pm.



> 
> Bye, Jörg.


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jörg Sommer - March 15, 2012, 3:59 p.m.
Lin Ming hat am Thu 15. Mar, 16:19 (+0800) geschrieben:
> On Thu, 2012-03-15 at 08:48 +0100, Jörg Sommer wrote:
> > Lin Ming hat am Thu 15. Mar, 11:26 (+0800) geschrieben:
> > > On Thu, 2012-03-15 at 09:59 +0800, Lin Ming wrote:
> > > > On Thu, 2012-03-15 at 02:48 +0100, Jörg Sommer wrote:
> > > > > Hi,
> > > > > 
> > > > > I'm getting these messages in a KVM virtualized host and the access to
> > > > > the disks is very slow. Using libata.dma=0 suppresses the warnings, but
> > > > > the disks are still slow.
> > > > 
> > > > Hi Jörg,
> > > > 
> > > > Let me try to reproduce this issue first.
> > > 
> > > I tried below commands on x86_32, but can't reproduce it.
> > > 
> > > qemu-system-i386 -kernel /root/vmlinuz-3.3.0-rc7 -append "root=/dev/sda1
> > > zcache" -hda /root/debian-32.img -hdb /root/data.img
> > > 
> > > Maybe because i386 uses different ata controller than ppc(ata_piix vs
> > > pata-macio).
> > > 
> > > I'll try qemu-system-ppc.
> > > 
> > > Did you need to run some workload to trigger these warings?
> > > Or did you get these warnings right after booting the VM?
> > 
> > These warnings come up before »INIT started«. I don't have to do
> > anything, just wait and see.
> > 
> > # truncate -s100M /mnt/data/new
> > # mke2fs -Fq /mnt/data/new
> > # mount -o loop /mnt/data/new /mnt/other
> > # cp --parents /bin/zsh-static /mnt/other/zsh
> > # umount /mnt/other
> > # qemu-system-ppc -enable-kvm -M mac99 -cpu G4 -k de -kernel /boot/vmlinuz-3.3.0-rc5-04520-g8d233c0 -append 'root=/dev/sda ro console=ttyPZ0 init=/zsh' -hda /mnt/data/new
> > 
> > I've uploaded my config and the kernel:
> > http://alioth.debian.org/~jo-guest/config-3.3.0-rc5-04520-g8d233c0
> > http://alioth.debian.org/~jo-guest/vmlinuz-3.3.0-rc5-04520-g8d233c0
> > 
> > You have to switch to the serial console (Ctrl-Alt-3 or with -nographic
> > Ctrl-a c). All kernel messages arrive there.
> > 
> > > Would you please try to disable ata port runtime pm?
> > > You can disable it by, for example,
> > 
> > Is this also possible with a kernel parameter? It takes very long until I
> > get a shell prompt.
> 
> No, but you can try below debug patch to disable port runtime pm.
> 
> diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
> index 74aaee3..8def3fc 100644
> --- a/drivers/ata/libata-transport.c
> +++ b/drivers/ata/libata-transport.c
> @@ -293,7 +293,6 @@ int ata_tport_add(struct device *parent,
>  
>  	device_enable_async_suspend(dev);
>  	pm_runtime_set_active(dev);
> -	pm_runtime_enable(dev);

This patch doesn't change anything. The kernel still hangs. If you have
more patches or ideas, let me know.

Bye, Jörg.
Lin Ming - March 19, 2012, 8:55 a.m.
On Thu, 2012-03-15 at 16:59 +0100, Jörg Sommer wrote:
> Lin Ming hat am Thu 15. Mar, 16:19 (+0800) geschrieben:
> > On Thu, 2012-03-15 at 08:48 +0100, Jörg Sommer wrote:
> > > Lin Ming hat am Thu 15. Mar, 11:26 (+0800) geschrieben:
> > > > On Thu, 2012-03-15 at 09:59 +0800, Lin Ming wrote:
> > > > > On Thu, 2012-03-15 at 02:48 +0100, Jörg Sommer wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > I'm getting these messages in a KVM virtualized host and the access to
> > > > > > the disks is very slow. Using libata.dma=0 suppresses the warnings, but
> > > > > > the disks are still slow.
> > > > > 
> > > > > Hi Jörg,
> > > > > 
> > > > > Let me try to reproduce this issue first.
> > > > 
> > > > I tried below commands on x86_32, but can't reproduce it.
> > > > 
> > > > qemu-system-i386 -kernel /root/vmlinuz-3.3.0-rc7 -append "root=/dev/sda1
> > > > zcache" -hda /root/debian-32.img -hdb /root/data.img
> > > > 
> > > > Maybe because i386 uses different ata controller than ppc(ata_piix vs
> > > > pata-macio).
> > > > 
> > > > I'll try qemu-system-ppc.
> > > > 
> > > > Did you need to run some workload to trigger these warings?
> > > > Or did you get these warnings right after booting the VM?
> > > 
> > > These warnings come up before »INIT started«. I don't have to do
> > > anything, just wait and see.
> > > 
> > > # truncate -s100M /mnt/data/new
> > > # mke2fs -Fq /mnt/data/new
> > > # mount -o loop /mnt/data/new /mnt/other
> > > # cp --parents /bin/zsh-static /mnt/other/zsh
> > > # umount /mnt/other
> > > # qemu-system-ppc -enable-kvm -M mac99 -cpu G4 -k de -kernel /boot/vmlinuz-3.3.0-rc5-04520-g8d233c0 -append 'root=/dev/sda ro console=ttyPZ0 init=/zsh' -hda /mnt/data/new
> > > 
> > > I've uploaded my config and the kernel:
> > > http://alioth.debian.org/~jo-guest/config-3.3.0-rc5-04520-g8d233c0
> > > http://alioth.debian.org/~jo-guest/vmlinuz-3.3.0-rc5-04520-g8d233c0
> > > 
> > > You have to switch to the serial console (Ctrl-Alt-3 or with -nographic
> > > Ctrl-a c). All kernel messages arrive there.
> > > 
> > > > Would you please try to disable ata port runtime pm?
> > > > You can disable it by, for example,
> > > 
> > > Is this also possible with a kernel parameter? It takes very long until I
> > > get a shell prompt.
> > 
> > No, but you can try below debug patch to disable port runtime pm.
> > 
> > diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
> > index 74aaee3..8def3fc 100644
> > --- a/drivers/ata/libata-transport.c
> > +++ b/drivers/ata/libata-transport.c
> > @@ -293,7 +293,6 @@ int ata_tport_add(struct device *parent,
> >  
> >  	device_enable_async_suspend(dev);
> >  	pm_runtime_set_active(dev);
> > -	pm_runtime_enable(dev);
> 
> This patch doesn't change anything. The kernel still hangs. If you have
> more patches or ideas, let me know.

I have reproduced this issue with qemu-system-pcc on x86.

Now I am debugging where the problem is.

Thanks,
Lin Ming

> 
> Bye, Jörg.


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index 74aaee3..8def3fc 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -293,7 +293,6 @@  int ata_tport_add(struct device *parent,
 
 	device_enable_async_suspend(dev);
 	pm_runtime_set_active(dev);
-	pm_runtime_enable(dev);
 
 	transport_add_device(dev);
 	transport_configure_device(dev);