← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1661430] Re: [Hyper-V] Fix ring buffer handling to avoid host throttling

 

** Changed in: linux (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1661430

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

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Xenial:
  Fix Released
Status in linux source package in Yakkety:
  Fix Released
Status in linux source package in Zesty:
  Fix Committed

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