[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function |
Date: |
Sat, 01 Aug 2015 12:21:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
On 28/07/15 19:02, Aurelien Jarno wrote:
>> Thanks for the heads-up. I have a fairly comprehensive suite of various
>> OS test images I use for OpenBIOS testing and evidently not a single one
>> of them issues a TRIM command as I don't see any regressions here. Can
>> you point me towards the particular test image you are using?
>
> You need a Linux based image, with a relatively recent kernel (3.2 is
> ok). The disk image has to be created with -drive file=...,discard=unmap
> for the TRIM feature to be advertised in the guest. Finally you need to
> run the command "fstrim /" or mount a partition or the swap with the
> option discard.
>
> As a summary:
> - wget
> https://people.debian.org/~aurel32/qemu/powerpc/debian_wheezy_powerpc_standard.qcow2
> - qemu-system-ppc -snapshot -drive
> file=debian_wheezy_powerpc_standard.qcow2,discard=unmap
> - in the image, login as root (password root) and run fstrim /.
>
> I have looked a bit at the code, and it looks like we have to provide a
> function similar to pmac_dma_read/write for the TRIM. I'll look at it a
> bit more in details and I will try to provide a patch, but it's probably
> won't be before the week-end.
I should add that regardless of whether the TRIM patch is applied or
not, the wheezy image reports DMA timeout errors which I don't see in
the squeeze or lenny images:
[ 5.420949] ata2.00: configured for MWDMA2
[ 5.451070] rtc-generic rtc-generic: setting system clock to
2015-08-01 11:13:25 UTC (1438427605)
[ 5.461100] Initializing network drop monitor service
[ 5.480460] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM
2.3. PQ: 0 ANSI: 5
[ 5.540013] Freeing unused kernel memory: 244k freed
[ 6.677779] udevd[46]: starting version 175
[ 8.548044] ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
[ 8.761179] eth0: RealTek RTL-8029 found at 0x400, IRQ 23,
52:54:00:12:34:56.
[ 10.300003] sd 0:0:0:0: [sda] 52428800 512-byte logical blocks: (26.8
GB/25.0 GiB)
[ 10.359219] pata-macio 0.00021000:ata-4: timeout flushing DMA
[ 10.400935] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 10.412768] ata2.00: BMDMA stat 0x6
[ 10.421732] sr 1:0:0:0: CDB: Mode Sense(10): 5a 00 2a 00 00 00 00 00
80 00
[ 10.430301] ata2.00: cmd a0/01:00:00:80:00/00:00:00:00:00/a0 tag 0
dma 16512 in
[ 10.430334] res 50/00:03:00:80:00/00:00:00:00:00/a0 Emask
0x20 (host bus error)
[ 10.459348] ata2.00: status: { DRDY }
[ 10.516892] sd 0:0:0:0: [sda] Write Protect is off
[ 10.524614] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 10.545353] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 10.655885] ata2.00: configured for MWDMA2
[ 10.665041] ata2: EH complete
and:
[ 14.016326] PM: Hibernation image partition 8:4 present
[ 14.016380] PM: Looking for hibernation image.
[ 14.020555] PM: Image not found (code -22)
[ 14.020642] PM: Hibernation image not present or could not be loaded.
[ 14.513667] EXT4-fs (sda3): mounted filesystem with ordered data
mode. Opts: (null)
[ 24.750778] udevd[252]: starting version 175
[ 31.040517] pata-macio 0.00021000:ata-4: timeout flushing DMA
[ 31.528077] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 31.546115] ata2.00: BMDMA stat 0x6
[ 31.562905] sr 1:0:0:0: [sr0] CDB: Get configuration: 46 00 00 00 00
00 00 00 10 00
[ 31.572557] ata2.00: cmd a0/01:00:00:10:00/00:00:00:00:00/a0 tag 0
dma 16400 in
[ 31.572589] res 50/00:03:00:10:00/00:00:00:00:00/a0 Emask
0x20 (host bus error)
[ 31.597940] ata2.00: status: { DRDY }
[ 32.139342] ata2.00: configured for MWDMA2
[ 32.148769] ata2: EH complete
I'll have a quick look with debugging enabled to see if I can spot
anything obvious.
ATB,
Mark.
- Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function,
Mark Cave-Ayland <=