Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-71993

Adaptive polling in AioContext can't properly handle events of different latency

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • rhel-9.4
    • qemu-kvm / Storage
    • None
    • No
    • Important
    • 2
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 13
    • False
    • Hide

      None

      Show
      None
    • None
    • virt-storage Sprint 2, virt-storage Sprint 3
    • None
    • None
    • None

      While implementing FUA support in file-posix for RHEL-66064, I noticed that unexpectedly, in some cases performance decreases instead of increasing when the additional fdatasync() calls aren't needed any more.

      Looking closer at the problem, I noticed that enabling FUA caused polling to be too short to be effective any more. The sequence during a request with flush emulation looks like this:

      1. Perform a write request on a slow disk -> polling disabled
      2. Completion involves a BH -> polling enabled with 4 µs
      3. Flush request -> fast because disk is write through, polling increased to 8 µs
      4. Completion involves a BH -> polling stays enabled

      This time was enough for fio in the guest to issue the next request so that polling in the host was effective. Without the flush request, polling duration remained too short and the iothread gave up.

      Obviously, this is not a sensible way to tune the polling duration. Instead, we should distinguish between different events, record their latencies separately and apply the polling duration that matches those events that we expect to happen next.

              kwolf@redhat.com Kevin Wolf
              kwolf@redhat.com Kevin Wolf
              virt-maint virt-maint
              qing wang qing wang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: