qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 0eeee0: ide: refactor retry_unit set and clea


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0eeee0: ide: refactor retry_unit set and clear into separa...
Date: Tue, 19 Jul 2016 05:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0eeee07e24b46a31c4a07f1ba27a33a077f5e38b
      
https://github.com/qemu/qemu/commit/0eeee07e24b46a31c4a07f1ba27a33a077f5e38b
  Author: Evgeny Yakovlev <address@hidden>
  Date:   2016-07-18 (Mon, 18 Jul 2016)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: refactor retry_unit set and clear into separate function

Code to set and clear state associated with retry in moved into
ide_set_retry and ide_clear_retry to make adding retry setups easier.

Signed-off-by: Evgeny Yakovlev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
CC: John Snow <address@hidden>
Signed-off-by: John Snow <address@hidden>


  Commit: 35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120
      
https://github.com/qemu/qemu/commit/35f78ab469b1d4ea4ff7ad4ffa997ae9ad3d4120
  Author: Evgeny Yakovlev <address@hidden>
  Date:   2016-07-18 (Mon, 18 Jul 2016)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: set retry_unit for PIO and FLUSH requests

The following sequence of tests discovered a problem in IDE emulation:
1. Send DMA write to IDE device 0
2. Send CMD_FLUSH_CACHE to same IDE device which will be failed by block
layer using blkdebug script in tests/ide-test:test_retry_flush

When doing DMA request ide/core.c will set s->retry_unit to s->unit in
ide_start_dma. When dma completes ide_set_inactive sets retry_unit to -1.
After that ide_flush_cache runs and fails thanks to blkdebug.
ide_flush_cb calls ide_handle_rw_error which asserts that s->retry_unit
== s->unit. But s->retry_unit is still -1 after previous DMA completion
and flush does not use anything related to retry.

This patch restricts retry unit assertion only to ops that actually use
retry logic.

Signed-off-by: Evgeny Yakovlev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
CC: John Snow <address@hidden>
Signed-off-by: John Snow <address@hidden>


  Commit: 2dd7e10d7c6ec6edbe610345cadd6ec82ee3e65f
      
https://github.com/qemu/qemu/commit/2dd7e10d7c6ec6edbe610345cadd6ec82ee3e65f
  Author: Evgeny Yakovlev <address@hidden>
  Date:   2016-07-18 (Mon, 18 Jul 2016)

  Changed paths:
    M tests/ahci-test.c
    M tests/ide-test.c

  Log Message:
  -----------
  tests: in IDE and AHCI tests perform DMA write before flushing

Due to changes in flush behaviour clean disks stopped generating
flush_to_disk events and IDE and AHCI tests that test flush commands
started to fail.

This change adds additional DMA writes to affected tests before sending
flush commands so that bdrv_flush actually generates flush_to_disk event.

Signed-off-by: Evgeny Yakovlev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
CC: John Snow <address@hidden>
Signed-off-by: John Snow <address@hidden>


  Commit: 3ff2f67a7c24183fcbcfe1332e5223ac6f96438c
      
https://github.com/qemu/qemu/commit/3ff2f67a7c24183fcbcfe1332e5223ac6f96438c
  Author: Evgeny Yakovlev <address@hidden>
  Date:   2016-07-18 (Mon, 18 Jul 2016)

  Changed paths:
    M block.c
    M block/io.c
    M include/block/block_int.h
    M tests/qemu-iotests/026.out
    M tests/qemu-iotests/026.out.nocache
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/089.out
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/144.out

  Log Message:
  -----------
  block: ignore flush requests when storage is clean

Some guests (win2008 server for example) do a lot of unnecessary
flushing when underlying media has not changed. This adds additional
overhead on host when calling fsync/fdatasync.

This change introduces a write generation scheme in BlockDriverState.
Current write generation is checked against last flushed generation to
avoid unnessesary flushes.

The problem with excessive flushing was found by a performance test
which does parallel directory tree creation (from 2 processes).
Results improved from 0.424 loops/sec to 0.432 loops/sec.
Each loop creates 10^3 directories with 10 files in each.

This affected some blkdebug testcases that were expecting error logs from
failure-injected flushes which are now skipped entirely
(tests 026 071 089).

This also affects the performance of block jobs and thus BLOCK_JOB_READY
events for driver-mirror and active block-commit commands now arrives
faster, before QMP send successfully returns to caller (tests 141 144).

Signed-off-by: Evgeny Yakovlev <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Fam Zheng <address@hidden>
CC: John Snow <address@hidden>
Signed-off-by: John Snow <address@hidden>


  Commit: ad31cd4c6945d7e0f0546d92d29dcd12325b4e4a
      
https://github.com/qemu/qemu/commit/ad31cd4c6945d7e0f0546d92d29dcd12325b4e4a
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-19 (Tue, 19 Jul 2016)

  Changed paths:
    M block.c
    M block/io.c
    M hw/ide/core.c
    M include/block/block_int.h
    M tests/ahci-test.c
    M tests/ide-test.c
    M tests/qemu-iotests/026.out
    M tests/qemu-iotests/026.out.nocache
    M tests/qemu-iotests/071.out
    M tests/qemu-iotests/089.out
    M tests/qemu-iotests/141.out
    M tests/qemu-iotests/144.out

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into 
staging

# gpg: Signature made Mon 18 Jul 2016 23:53:15 BST
# gpg:                using RSA key 0x7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <address@hidden>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jnsnow/tags/ide-pull-request:
  block: ignore flush requests when storage is clean
  tests: in IDE and AHCI tests perform DMA write before flushing
  ide: set retry_unit for PIO and FLUSH requests
  ide: refactor retry_unit set and clear into separate function

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0c1b58f25025...ad31cd4c6945

reply via email to

[Prev in Thread] Current Thread [Next in Thread]