No logs, request to include upstream commits.

** Changed in: linux (Ubuntu)
       Status: Incomplete => Confirmed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1661430

Title:
  [Hyper-V] Fix ring buffer handling to avoid host throttling

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  An unfortunate side effect of some of the recent work done to improve
  ring buffer performance made a situation where the host would
  interpret guest requests as a denial of service attack, pausing guest
  communications for five seconds. This series of fixes corrects this
  problem.

  Needed for each kernel that has included a389fcfd2cb5 ("Drivers: hv:
  vmbus: Fix signaling logic in hv_need_to_signal_on_read()")

  
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=74198eb4a42c4a3c4fbef08fa01a291a282f7c2e

  Drivers: hv: vmbus: Base host signaling strictly on the ring state
  One of the factors that can result in the host concluding that a given
  guest in mounting a DOS attack is if the guest generates interrupts
  to the host when the host is not expecting it. If these "spurious"
  interrupts reach a certain rate, the host can throttle the guest to
  minimize the impact. The host computation of the "expected number
  of interrupts" is strictly based on the ring transitions. Until
  the host logic is fixed, base the guest logic to interrupt solely
  on the ring state.

  
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1f6ee4e7d83586c8b10bd4f2f4346353d04ce884

  Drivers: hv: vmbus: On write cleanup the logic to interrupt the host
  Signal the host when we determine the host is to be signaled.
  The currrent code determines the need to signal in the ringbuffer
  code and actually issues the signal elsewhere. This can result
  in the host viewing this interrupt as spurious since the host may also
  poll the channel. Make the necessary adjustments.

  https://git.kernel.org/cgit/linux/kernel/git/next/linux-
  next.git/commit/?id=3372592a140db69fd63837e81f048ab4abf8111e

  Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host
  Signal the host when we determine the host is to be signaled -
  on th read path. The currrent code determines the need to signal in the
  ringbuffer code and actually issues the signal elsewhere. This can result
  in the host viewing this interrupt as spurious since the host may also
  poll the channel. Make the necessary adjustments.

  https://git.kernel.org/cgit/linux/kernel/git/next/linux-
  next.git/commit/?id=433e19cf33d34bb6751c874a9c00980552fe508c

  Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
  Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
  hv_need_to_signal_on_read()")
  added the proper mb(), but removed the test "prev_write_sz < pending_sz"
  when making the signal decision.

  As a result, the guest can signal the host unnecessarily,
  and then the host can throttle the guest because the host
  thinks the guest is buggy or malicious; finally the user
  running stress test can perceive intermittent freeze of
  the guest.

  This patch brings back the test, and properly handles the
  in-place consumption APIs used by NetVSC (see get_next_pkt_raw(),
  put_pkt_raw() and commit_rd_index()).

  Fixes: a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
  hv_need_to_signal_on_read()")

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1661430/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to