Skip to content
  1. Aug 22, 2019
  2. Aug 21, 2019
    • Felix Fietkau's avatar
      mac80211: minstrel_ht: improve rate probing for devices with static fallback · 48cb3952
      Felix Fietkau authored
      
      
      On some devices that only support static rate fallback tables sending rate
      control probing packets can be really expensive.
      Probing lower rates can already hurt throughput quite a bit. What hurts even
      more is the fact that on mt76x0/mt76x2, single probing packets can only be
      forced by directing packets at a different internal hardware queue, which
      causes some heavy reordering and extra latency.
      The reordering issue is mainly problematic while pushing lots of packets to
      a particular station. If there is little activity, the overhead of probing is
      neglegible.
      
      The static fallback behavior is designed to pretty much only handle rate
      control algorithms that use only a very limited set of rates on which the
      algorithm switches up/down based on packet error rate.
      
      In order to better support that kind of hardware, this patch implements a
      different approach to rate probing where it switches to a slightly higher rate,
      waits for tx status feedback, then updates the stats and switches back to
      the new max throughput rate. This only triggers above a packet rate of 100
      per stats interval (~50ms).
      For that kind of probing, the code has to reduce the set of probing rates
      a lot more compared to single packet probing, so it uses only one packet
      per MCS group which is either slightly faster, or as close as possible to
      the max throughput rate.
      This allows switching between similar rates with different numbers of
      streams. The algorithm assumes that the hardware will work its way lower
      within an MCS group in case of retransmissions, so that lower rates don't
      have to be probed by the high packets per second rate probing code.
      
      To further reduce the search space, it also does not probe rates with lower
      channel bandwidth than the max throughput rate.
      
      At the moment, these changes will only affect mt76x0/mt76x2.
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Link: https://lore.kernel.org/r/20190820095449.45255-4-nbd@nbd.name
      
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      48cb3952
    • Felix Fietkau's avatar
      mac80211: minstrel_ht: fix default max throughput rate indexes · 21f7981b
      Felix Fietkau authored
      
      
      Use the first supported rate instead of 0 (which can be invalid)
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Link: https://lore.kernel.org/r/20190820095449.45255-3-nbd@nbd.name
      
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      21f7981b
    • Felix Fietkau's avatar
      mac80211: minstrel_ht: reduce unnecessary rate probing attempts · f793c7ee
      Felix Fietkau authored
      
      
      On hardware with static fallback tables (e.g. mt76x2), rate probing attempts
      can be very expensive.
      On such devices, avoid sampling rates slower than the per-group max throughput
      rate, based on the assumption that the fallback table will take care of probing
      lower rates within that group if the higher rates fail.
      
      To further reduce unnecessary probing attempts, skip duplicate attempts on
      rates slower than the max throughput rate.
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Link: https://lore.kernel.org/r/20190820095449.45255-2-nbd@nbd.name
      
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f793c7ee